Class jFile

Description

A class helper to read or create files

Located in /utils/jFile.class.php (line 22)


	
			
Method Summary
static void createDir (string $dir)
static string read (string $filename)
static void removeDir (string $path, [boolean $deleteParent = true])
static void write ( $file,  $data)
Methods
static createDir (line 86)

create a directory

It creates also all necessary parent directory

  • access: public
static void createDir (string $dir)
  • string $dir: the path of the directory
static read (line 28)

Reads the content of a file.

  • return: the content of the file. false if cannot read the file
  • access: public
static string read (string $filename)
  • string $filename: the filename we're gonna read
static removeDir (line 103)

Recursive function deleting a directory

  • author: Loic Mathaud
  • since: 1.0b1
  • access: public
static void removeDir (string $path, [boolean $deleteParent = true])
  • string $path: The path of the directory to remove recursively
  • boolean $deleteParent: If the path must be deleted too
static write (line 42)

Write a file to the disk.

This function is heavily based on the way smarty process its own files. Is using a temporary file and then rename the file. We guess the file system will be smarter than us, avoiding a writing / reading while renaming the file. This method comes from CopixFile class of Copix framework

static void write ( $file,  $data)
  • $file
  • $data

Documentation generated on Wed, 07 Sep 2011 13:47:18 +0200 by phpDocumentor 1.4.3