Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5

 Class JPath

Description

A Path handling class

  • since: 1.5

Located in /joomla/filesystem/path.php (line 38)

Class JPath   (Subpackage FileSystem)
Method Summary
Static method static string clean (string $path, [string $ds = DS])
Static method static boolean isOwner (string $path)
Method boolean canChmod (string $path)
Method string check (string $path)
Method mixed find ( $paths, string $file, array $path)
Method string getPermissions (string $path)
Method boolean setPermissions (string $path, [string $filemode = '0644'], [string $foldermode = '0755'])
Methods
canChmod (line 47)

Checks if a path's permissions can be changed

  • return: True if path can have mode changed
  • since: 1.5
boolean canChmod (string $path)
  • string $path: Path to check
check (line 146)

Checks for snooping outside of the file system root

  • return: A cleaned version of the path
  • since: 1.5
string check (string $path)
  • string $path: A file system path to check
clean (line 168)

Function to strip additional / or \ in a path name

  • return: The cleaned path
  • since: 1.5
string clean (string $path, [string $ds = DS])
  • string $path: The path to clean
  • string $ds: Directory separator (optional)
find (line 204)

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: 1.5
  • access: protected
mixed find ( $paths, string $file, array $path)
  • array $path: An array of paths to search in
  • string $file: The file name to look for.
  • $paths
getPermissions (line 118)

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

  • return: Filesystem permissions
  • since: 1.5
string getPermissions (string $path)
  • string $path: The path of a file/folder
isOwner (line 190)

Method to determine if script owns the path

  • return: True if the php script owns the path passed
  • since: 1.5
boolean isOwner (string $path)
  • string $path: Path to check ownership
setPermissions (line 70)

Chmods files and directories recursivly to given permissions

  • return: True if successful [one fail means the whole operation failed]
  • since: 1.5
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, 05 Mar 2007 21:13:51 +0000 by phpDocumentor 1.3.1