File/common/pcf_file.phpinc

Description

Common Directory Functions

Functions
pcf_checkFileName (line 28)

returns a filename where some special char are converted unknown chars are replaced with _

  • version: pk-05-03-17 $replChar added
  • usedby: pcf_checkDirName() - for each directory name
string pcf_checkFileName (string $fileName, [string $replChar = "_"])
  • string $fileName
  • string $replChar
pcf_checkFilePath (line 41)

returns a clean filepath (remove multiple $dirSep)

string pcf_checkFilePath (string $filePath, [char $dirSep = _OCSP_DIRSEP_])
  • string $filePath
  • char $dirSep
pcf_fileExists (line 94)

check if a file exists

this function is designed to bypass safe_mode restrictions for some allowed directories see $GLOBALS['BYPASS_SAFEMODE']['PROJ_DIRS']

  • todo: only in design state now just calls file_exists($file)
void pcf_fileExists ( $file, [ $debug = FALSE])
  • $file
  • $debug
pcf_fileGetExtension (line 166)

returns the extension of a fileName (the last .xxx)

  • since: pk-05-09-09
string pcf_fileGetExtension (string $fileName, [boolean $debug = FALSE])
  • string $fileName
  • boolean $debug
pcf_fileLink (line 110)

symlinks a file

this function is designed to bypass safe_mode restrictions for some allowed directories see $GLOBALS['BYPASS_SAFEMODE']['PROJ_DIRS']

  • todo: only in design state now just calls symlink($source,$dest)
void pcf_fileLink ( $source,  $dest, [ $debug = FALSE])
  • $source
  • $dest
  • $debug
pcf_fileMove (line 124)

moves a file

this function is designed to bypass safe_mode restrictions for some allowed directories see $GLOBALS['BYPASS_SAFEMODE']['PROJ_DIRS']

  • todo: only in design state now just calls copy() and unlink()
void pcf_fileMove ( $source,  $dest, [ $debug = FALSE])
  • $source
  • $dest
  • $debug
pcf_fileSize (line 148)

size of a file in bytes

this function is designed to bypass safe_mode restrictions for some allowed directories see $GLOBALS['BYPASS_SAFEMODE']['PROJ_DIRS']

  • version: pk-07-08-02
  • todo: bypass safe_mode
int pcf_fileSize (string $file, [boolean $debug = FALSE])
  • string $file
  • boolean $debug
pcf_fileunlink (line 80)

removes a file from the project

this function is designed to bypass safe_mode restrictions for some allowed directories see $GLOBALS['BYPASS_SAFEMODE']['PROJ_DIRS']

if $file is within this path a unlink shellscript is executed otherwise the php unlink command is executed

  • todo: only in design state now just calls unlink($file)
void pcf_fileunlink (string $file, [ $debug = FALSE])
  • string $file
  • $debug
pcf_genUniqFileName (line 180)

generates a unique file name

  • since: pk-07-11-18
string pcf_genUniqFileName (string $fileName)
  • string $fileName
pcf_is_file (line 202)

checks if a file is a file (follow links)

  • since: pk-08-05-18
boolean pcf_is_file (string $file)
  • string $file

Documentation generated on Thu, 08 Jan 2009 17:47:47 +0100 by phpDocumentor 1.4.0a2