Class we_util_File

Description

static class for various common filesystem operations

this is a merge of the old weFile class and the old we_live_tools.inc.php Script of webEdition 5.1.x and older

Located in /util/File.php (line 20)


	
			
Method Summary
static void addTrailingSlash ( $value)
static void checkAndMakeFolder ( $path, [ $recursive = false])
static void checkWritePermissions ( $path, [ $mod = 0755], [ $nocreate = false])
static void compress ( $file, [ $compression = "gzip"], [ $destination = ""], [ $remove = true], [ $writemode = "wb"])
static void copyFile ( $old,  $new)
static void createLocalFolder ( $RootDir, [ $path = ""])
static void createLocalFolderByPath ( $completeDirPath)
static void decompress ( $gzfile, [ $remove = true])
static void delete ( $filename)
static void deleteLocalFolder ( $filename, [ $delAll = 0])
static void getComPrefix ( $compression)
static void getCompression ( $filename)
static void getContentDirectFromDB ( $id,  $name, [ $db = ""])
static void getUniqueId ([ $md5 = true])
static void getZExtension ( $compression)
static void hasBzip ()
static void hasCompression ( $comp)
static void hasGzip ()
static void hasURL ( $filename)
static void hasZip ()
static void insertIntoCleanUp ( $path,  $date)
static void insertIntoErrorLog ( $text)
static void isCompressed ( $file, [ $offset = 0])
static void load ( $filename, [ $flags = "rb"], [ $rsize = 8192])
static void loadLine ( $filename, [ $offset = 0], [ $rsize = 8192], [ $iscompressed = 0])
static void loadPart ( $filename, [ $offset = 0], [ $rsize = 8192], [ $iscompressed = 0])
static void mkpath ( $path)
static void moveDir ( $dir,  $target)
static void moveFile ( $old,  $new)
static void removeTrailingSlash ( $value)
static void renameFile ( $old,  $new)
static void save ( $filename,  $content, [ $flags = "wb"], [ $create_path = false])
static void saveFile ( $file_name, [ $sourceCode = ""])
static void saveTemp ( $content, [ $filename = ""], [ $flags = "wb"])
static void splitFile ( $filename,  $path, [ $pattern = ""], [ $split_size = 0], [ $marker = ""])
void rmdirr (string $path, [bool $nofiles = false])
Methods
static method addTrailingSlash (line 721)
  • access: public
static void addTrailingSlash ( $value)
  • $value
static method checkAndMakeFolder (line 514)
  • access: public
static void checkAndMakeFolder ( $path, [ $recursive = false])
  • $path
  • $recursive
static method checkWritePermissions (line 554)

checks permission to write in path $path and tries a chmod(0755)

  • access: public
static void checkWritePermissions ( $path, [ $mod = 0755], [ $nocreate = false])
  • $path
  • $mod
  • $nocreate
static method compress (line 354)
  • access: public
static void compress ( $file, [ $compression = "gzip"], [ $destination = ""], [ $remove = true], [ $writemode = "wb"])
  • $file
  • $compression
  • $destination
  • $remove
  • $writemode
static method copyFile (line 610)

copy a file due to windows limitations, the file has to be copied and the old file deleted afterwards.

if $new exists already, windows will not rename the file $old

  • access: public
static void copyFile ( $old,  $new)
  • $old
  • $new
static method createLocalFolder (line 458)
  • access: public
static void createLocalFolder ( $RootDir, [ $path = ""])
  • $RootDir
  • $path
static method createLocalFolderByPath (line 466)
  • access: public
static void createLocalFolderByPath ( $completeDirPath)
  • $completeDirPath
static method decompress (line 395)
  • access: public
static void decompress ( $gzfile, [ $remove = true])
  • $gzfile
  • $remove
static method delete (line 169)
  • access: public
static void delete ( $filename)
  • $filename
static method deleteLocalFolder (line 658)
  • access: public
static void deleteLocalFolder ( $filename, [ $delAll = 0])
  • $filename
  • $delAll
static method getComPrefix (line 322)
  • access: public
static void getComPrefix ( $compression)
  • $compression
static method getCompression (line 343)
  • access: public
static void getCompression ( $filename)
  • $filename
static method getContentDirectFromDB (line 590)
  • access: public
static void getContentDirectFromDB ( $id,  $name, [ $db = ""])
  • $id
  • $name
  • $db
static method getUniqueId (line 195)
  • access: public
static void getUniqueId ([ $md5 = true])
  • $md5
static method getZExtension (line 333)
  • access: public
static void getZExtension ( $compression)
  • $compression
static method hasBzip (line 306)
  • access: public
static void hasBzip ()
static method hasCompression (line 311)
  • access: public
static void hasCompression ( $comp)
  • $comp
static method hasGzip (line 296)
  • access: public
static void hasGzip ()
static method hasURL (line 187)
  • access: public
static void hasURL ( $filename)
  • $filename
static method hasZip (line 301)
  • access: public
static void hasZip ()
static method insertIntoCleanUp (line 504)
  • access: public
static void insertIntoCleanUp ( $path,  $date)
  • $path
  • $date
static method insertIntoErrorLog (line 582)
  • access: public
static void insertIntoErrorLog ( $text)
  • $text
static method isCompressed (line 424)
  • access: public
static void isCompressed ( $file, [ $offset = 0])
  • $file
  • $offset
static method load (line 23)
  • access: public
static void load ( $filename, [ $flags = "rb"], [ $rsize = 8192])
  • $filename
  • $flags
  • $rsize
static method loadLine (line 47)
  • access: public
static void loadLine ( $filename, [ $offset = 0], [ $rsize = 8192], [ $iscompressed = 0])
  • $filename
  • $offset
  • $rsize
  • $iscompressed
static method loadPart (line 88)
  • access: public
static void loadPart ( $filename, [ $offset = 0], [ $rsize = 8192], [ $iscompressed = 0])
  • $filename
  • $offset
  • $rsize
  • $iscompressed
static method mkpath (line 285)
  • access: public
static void mkpath ( $path)
  • $path
static method moveDir (line 639)

recursively moves a directory

it will only move $dir if there is no directory in $target with the same name

  • access: public
static void moveDir ( $dir,  $target)
  • $dir
  • $target
static method moveFile (line 623)

move/rename a file due to windows limitations, the file has to be copied and the old file deleted afterwards.

if $new exists already, windows will not rename the file $old

  • access: public
static void moveFile ( $old,  $new)
  • $old
  • $new
static method removeTrailingSlash (line 730)
  • access: public
static void removeTrailingSlash ( $value)
  • $value
static method renameFile (line 600)
  • deprecated: since - 05.06.2008 please use moveFile() instead
  • access: public
static void renameFile ( $old,  $new)
  • $old
  • $new
static method save (line 129)
  • access: public
static void save ( $filename,  $content, [ $flags = "wb"], [ $create_path = false])
  • $filename
  • $content
  • $flags
  • $create_path
static method saveFile (line 442)
  • access: public
static void saveFile ( $file_name, [ $sourceCode = ""])
  • $file_name
  • $sourceCode
static method saveTemp (line 158)
  • access: public
static void saveTemp ( $content, [ $filename = ""], [ $flags = "wb"])
  • $content
  • $filename
  • $flags
static method splitFile (line 208)

split a file into various parts of a predefined size

  • access: public
static void splitFile ( $filename,  $path, [ $pattern = ""], [ $split_size = 0], [ $marker = ""])
  • $filename
  • $path
  • $pattern
  • $split_size
  • $marker
rmdirr (line 686)

recursively deletes a directory with all its contents

void rmdirr (string $path, [bool $nofiles = false])
  • string $path: path to the directory that has to be deleted
  • bool $nofiles: does not delete any files but only empty subdirectories

Documentation generated on Mon, 01 Sep 2008 11:35:38 +0200 by phpDocumentor 1.4.0