Joomla! 1.5 API

Packages

Package: Joomla-Framework

License

Content on this site is copyright © 2005 - 2011 Open Source Matters Inc and can be used in accordance with the Joomla! Electronic Documentation License. Some parts of this website may be subject to other licenses.

 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|string $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 232)

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|string $path)
  • array|string $path: An path or array of path 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]
Support Joomla!