[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/joomla/filesystem/src/ -> Folder.php (summary)

Part of the Joomla Framework Filesystem Package

Copyright: Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
License: GNU General Public License version 2 or later; see LICENSE
File Size: 590 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 9 functions

  copy()
  create()
  delete()
  move()
  files()
  folders()
  _items()
  listFolderTree()
  makeSafe()

Functions
Functions that are not part of a class:

copy($src, $dest, $path = '', $force = false, $useStreams = false)   X-Ref
Copy a folder.

param: string   $src         The path to the source folder.
param: string   $dest        The path to the destination folder.
param: string   $path        An optional base path to prefix to the file names.
param: boolean  $force       Force copy.
param: boolean  $useStreams  Optionally force folder/file overwrites.
return: boolean  True on success.

create($path = '', $mode = 0755)   X-Ref
Create a folder -- and all necessary parent folders.

param: string   $path  A path to create from the base path.
param: integer  $mode  Directory permissions to set for folders created. 0755 by default.
return: boolean  True if successful.

delete($path)   X-Ref
Delete a folder.

param: string  $path  The path to the folder to delete.
return: boolean  True on success.

move($src, $dest, $path = '', $useStreams = false)   X-Ref
Moves a folder.

param: string   $src         The path to the source folder.
param: string   $dest        The path to the destination folder.
param: string   $path        An optional base path to prefix to the file names.
param: boolean  $useStreams  Optionally use streams.
return: string|boolean  Error message on false or boolean true on success.

files($path, $filter = '.', $recurse = false, $full = false, $exclude = ['.svn', 'CVS', '.DS_Store', '__MACOSX'],$excludeFilter = ['^\..*', '.*~'])   X-Ref
Utility function to read the files in a folder.

param: string   $path           The path of the folder to read.
param: string   $filter         A filter for file names.
param: mixed    $recurse        True to recursively search into sub-folders, or an integer to specify the maximum depth.
param: boolean  $full           True to return the full path to the file.
param: array    $exclude        Array with names of files which should not be shown in the result.
param: array    $excludeFilter  Array of filter to exclude
return: array  Files in the given folder.

folders($path, $filter = '.', $recurse = false, $full = false, $exclude = ['.svn', 'CVS', '.DS_Store', '__MACOSX'],$excludeFilter = ['^\..*'])   X-Ref
Utility function to read the folders in a folder.

param: string   $path           The path of the folder to read.
param: string   $filter         A filter for folder names.
param: mixed    $recurse        True to recursively search into sub-folders, or an integer to specify the maximum depth.
param: boolean  $full           True to return the full path to the folders.
param: array    $exclude        Array with names of folders which should not be shown in the result.
param: array    $excludeFilter  Array with regular expressions matching folders which should not be shown in the result.
return: array  Folders in the given folder.

_items($path, $filter, $recurse, $full, $exclude, $excludeFilterString, $findfiles)   X-Ref
Function to read the files/folders in a folder.

param: string   $path                 The path of the folder to read.
param: string   $filter               A filter for file names.
param: mixed    $recurse              True to recursively search into sub-folders, or an integer to specify the maximum depth.
param: boolean  $full                 True to return the full path to the file.
param: array    $exclude              Array with names of files which should not be shown in the result.
param: string   $excludeFilterString  Regexp of files to exclude
param: boolean  $findfiles            True to read the files, false to read the folders
return: array  Files.

listFolderTree($path, $filter, $maxLevel = 3, $level = 0, $parent = 0)   X-Ref
Lists folder in format suitable for tree display.

param: string   $path      The path of the folder to read.
param: string   $filter    A filter for folder names.
param: integer  $maxLevel  The maximum number of levels to recursively read, defaults to three.
param: integer  $level     The current level, optional.
param: integer  $parent    Unique identifier of the parent folder, if any.
return: array  Folders in the given folder.

makeSafe($path)   X-Ref
Makes path name safe to use.

param: string  $path  The full path to sanitise.
return: string  The sanitised string.



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer