Class JPath

Description

A Path handling class

  • since: 11.1

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


	
			
Method Summary
 static boolean canChmod (string $path)
 static string check (string $path)
 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 canChmod (line 36)

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 check (line 166)

Checks for snooping outside of the file system root.

  • return: A cleaned version of the path or exit on error.
  • throws: Exception
  • since: 11.1
  • access: public
static string check (string $path)
  • string $path: A file system path to check.
static clean (line 195)

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

  • return: The cleaned path.
  • throws: UnexpectedValueException
  • 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 find (line 274)

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 getPermissions (line 129)

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

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

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 setPermissions (line 64)

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 Tue, 19 Nov 2013 15:10:23 +0100 by phpDocumentor 1.4.3