Class JPath

Description

A Path handling class

  • since: 1.1
  • static:

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


	
			
Method Summary
 boolean canChmod (string $path)
 void check (string $path)
 string clean (string $p_path, [boolean $p_addtrailingslash = true])
 string getPermissions (string $path)
 boolean isOwner (string $path)
 boolean setPermissions (string $path, [string $filemode = '0644'], [string $foldermode = '0755'])
Methods
canChmod (line 46)

Checks if a path's permissions can be changed

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

Checks for snooping outside of the file system root

  • since: 1.1
void check (string $path)
  • string $path: A file system path to check
clean (line 158)

Function to strip additional / or \ in a path name

  • return: The cleaned path
  • since: 1.1
string clean (string $p_path, [boolean $p_addtrailingslash = true])
  • string $p_path: The path to clean
  • boolean $p_addtrailingslash: True if the function shoul add a trailing slash
getPermissions (line 107)

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

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

Method to determine if script owns the path

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

Chmods files and directories recursivly to given permissions

  • return: True if successful [one fail means the whole operation failed]
  • since: 1.1
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 Sat, 4 Feb 2006 14:25:49 +0100 by phpDocumentor 1.3.0RC4