Class FSTools_File

Description

Represents a file in the filesystem

Represents a file in the filesystem

Located in /extras/FSTools/File.php (line 10)


	
			
Variable Summary
mixed $fs
mixed $handle
mixed $name
Method Summary
FSTools_File __construct ( $name, [ $fs = false])
void __destruct ()
void chmod ( $octal_code)
void close ()
void delete ()
void eof ()
void exists ()
void get ()
void getChar ()
void getDirectory ()
void getLine ([ $length = null])
void getMTime ()
void getName ()
void open ( $mode)
void put ( $string)
void read ( $length)
void write ( $contents)
Variables
mixed $fs (line 20)

Instance of FSTools for interfacing with filesystem

Instance of FSTools for interfacing with filesystem

  • access: protected
mixed $handle = false (line 17)

Handle for the file

Handle for the file

  • access: protected
mixed $name (line 14)

Filename of file this object represents

Filename of file this object represents

  • access: protected
Methods
Constructor __construct (line 26)

Filename of file you wish to instantiate.

Filename of file you wish to instantiate.

  • access: public
FSTools_File __construct ( $name, [ $fs = false])
  • $name
  • $fs
Destructor __destruct (line 120)
  • access: public
void __destruct ()
chmod (line 70)

Chmod a file

Chmod a file

  • access: public
void chmod ( $octal_code)
  • $octal_code
close (line 82)

Closes file's handle

Closes file's handle

  • access: public
void close ()
delete (line 51)

Deletes the file

Deletes the file

  • access: public
void delete ()
eof (line 115)

Returns TRUE if the end of the file has been reached

Returns TRUE if the end of the file has been reached

  • access: public
void eof ()
exists (line 56)

Returns true if file exists and is a file.

Returns true if file exists and is a file.

  • access: public
void exists ()
get (line 41)

Retrieves the contents of a file

Retrieves the contents of a file

  • todo: Throw an exception if file doesn't exist
  • access: public
void get ()
getChar (line 97)

Retrieves a character from an open file

Retrieves a character from an open file

  • access: public
void getChar ()
getDirectory (line 35)

Returns directory of the file without trailing slash

Returns directory of the file without trailing slash

  • access: public
void getDirectory ()
getLine (line 90)

Retrieves a line from an open file, with optional max length $length

Retrieves a line from an open file, with optional max length $length

  • access: public
void getLine ([ $length = null])
  • $length
getMTime (line 61)

Returns last file modification time

Returns last file modification time

  • access: public
void getMTime ()
getName (line 32)

Returns the filename of the file.

Returns the filename of the file.

  • access: public
void getName ()
open (line 75)

Opens file's handle

Opens file's handle

  • access: public
void open ( $mode)
  • $mode
put (line 109)

Writes to an open file

Writes to an open file

  • access: public
void put ( $string)
  • $string
read (line 103)

Retrieves an $length bytes of data from an open data

Retrieves an $length bytes of data from an open data

  • access: public
void read ( $length)
  • $length
write (line 46)

Writes contents to a file, creates new file if necessary

Writes contents to a file, creates new file if necessary

  • access: public
void write ( $contents)
  • $contents

Documentation generated on Thu, 19 Jun 2008 18:49:11 -0400 by phpDocumentor 1.4.2