Class JPath

Description

A Path handling class

  • since: 11.1

Located in /libraries/joomla/filesystem/path.php (line 37)


	
			
Method Summary
static boolean canChmod (string $path)
static string check (string $path, [string $ds = DIRECTORY_SEPARATOR])
static string clean (string $path, [string $ds = DIRECTORY_SEPARATOR])
static mixed find (mixed $paths, string $file)
static string getPermissions (string $path)
static boolean isOwner (string $path)
static boolean setPermissions (string $path, [string $filemode = '0644'], [string $foldermode = '0755'])
Methods
static method canChmod (line 48)

Checks if a path's permissions can be changed.

  • return: True if path can have mode changed.
  • since: 11.1
  • access: public
static boolean canChmod (string $path)
  • string $path: Path to check.
static method check (line 170)

Checks for snooping outside of the file system root.

  • return: A cleaned version of the path or exit on error.
  • since: 11.1
  • access: public
static string check (string $path, [string $ds = DIRECTORY_SEPARATOR])
  • string $path: A file system path to check.
  • string $ds: Directory separator (optional).
static method clean (line 200)

Function to strip additional / or \ in a path name.

  • return: The cleaned path.
  • since: 11.1
  • access: public
static string clean (string $path, [string $ds = DIRECTORY_SEPARATOR])
  • string $path: The path to clean.
  • string $ds: Directory separator (optional).
static method find (line 269)

Searches the directory paths for a given file.

  • return: The full path and file name for the target file, or boolean false if the file is not found in any of the paths.
  • since: 11.1
  • access: public
static mixed find (mixed $paths, string $file)
  • mixed $paths: An path string or array of path strings to search in
  • string $file: The file name to look for.
static method getPermissions (line 136)

Get the permissions of the file/folder at a give path.

  • return: Filesystem permissions.
  • since: 11.1
  • access: public
static string getPermissions (string $path)
  • string $path: The path of a file/folder.
static method isOwner (line 226)

Method to determine if script owns the path.

  • return: True if the php script owns the path passed.
  • since: 11.1
  • access: public
static boolean isOwner (string $path)
  • string $path: Path to check ownership.
static method setPermissions (line 74)

Chmods files and directories recursively to given permissions.

  • return: True if successful [one fail means the whole operation failed].
  • since: 11.1
  • access: public
static boolean setPermissions (string $path, [string $filemode = '0644'], [string $foldermode = '0755'])
  • string $path: Root path to begin changing mode [without trailing slash].
  • string $filemode: Octal representation of the value to change file mode to [null = no change].
  • string $foldermode: Octal representation of the value to change folder mode to [null = no change].

Documentation generated on Mon, 25 Jun 2012 13:58:38 -0500 by phpDocumentor 1.4.4