Class: VFile

Source Location: /libraries/vwp/filesystem/local/file.php

Class Overview [line 35]

VType
   |
   --VObject
      |
      --VFilesystemDriver
         |
         --VFile

Virtual Web Platform - File Support

Author(s):

Version:

Copyright:

  • (c) Ralph Ritoch - All Rights Reserved

Variables

Constants

Methods


Child classes:

VFTPFile
Virtual Web Platform - FTP File Support

Inherited Methods

Class: VObject

VObject::__construct()
Class Constructor
VObject::bind()
Bind values to this object
VObject::delete()
Delete Object
VObject::get()
Get value
VObject::getAll()
Get all object values
VObject::getError()
Get error message
VObject::getErrors()
Get errors
VObject::getMethods()
Get object methods
VObject::getProperties()
Get object properties
VObject::save()
Save Object
VObject::set()
Set a value
VObject::setError()
Set error value
VObject::setProperties()
Set property values
VObject::setProperty()
Set property value
VObject::toString()
Convert object to string
VObject::__destruct()
Class Destructor
VObject::__toString()
Return object as a string


Class Details

Virtual Web Platform - File Support

This class provides File Support

Tags:

[ Top ]


Class Variables


Class Methods

static getInstance

static object File &getInstance( &$client)

[line 45]

Get instance of File object

Tags:

  • return - object
  • access - public

Overridden in child classes as:

VFTPFile::getInstance()
Get instance of File object

Parameters:

  • &$client -

[ Top ]

copy

true|object True copy( string $src, string $dest, [string $path = null], [ $sourceSystem = null])

[line 191]

Copies a file

Tags:

  • return - on success, error or warning otherwise

Overridden in child classes as:

VFTPFile::copy()
Copies a file

Parameters:

  • string $src - The path to the source file
  • string $dest - The path to the destination file
  • string $path - An optional base path to prefix to the file names
  • $sourceSystem -

[ Top ]

delete

true|object delete( mixed $file)

[line 242]

Delete a file or array of files

Tags:

  • return - True on success, error or warning otherwise
  • access - public

Overridden in child classes as:

VFTPFile::delete()
Delete a file or array of files

Overrides VObject::delete() (Delete Object)

Parameters:

  • mixed $file - The file name or an array of file names

[ Top ]

exists

boolean exists( string $file)

[line 399]

Check if file exists

Tags:

  • return - True if path is a file

Overridden in child classes as:

VFTPFile::exists()
Check if file exists

Parameters:

  • string $file - File path

[ Top ]

getExt

string|object The getExt( string $file)

[line 91]

Gets the extension of a file name

Tags:

  • return - file extension on success, error or warning on failure
  • access - public

Overridden in child classes as:

VFTPFile::getExt()
Gets the extension of a file name

Parameters:

  • string $file - The file name

[ Top ]

getFolderInstance

object Folder &getFolderInstance( )

[line 58]

Get instance of Folder object

Tags:

  • return - object
  • access - public

Overridden in child classes as:

VFTPFile::getFolderInstance()
Get instance of Folder object

Parameters:

[ Top ]

getMTime

integer|object Unix getMTime( string $file)

[line 72]

Get modification time

Tags:

  • return - timestamp on success, warning or error otherwise
  • access - public

Overridden in child classes as:

VFTPFile::getMTime()
Get modification time

Parameters:

  • string $file - Filename

[ Top ]

getName

string getName( $file)

[line 411]

Returns the name, sans any path

param string $file File path

Tags:

  • return - filename

Overridden in child classes as:

VFTPFile::getName()
Returns the name, sans any path

Parameters:

  • $file -

[ Top ]

makeSafe

string makeSafe( string $file)

[line 121]

Makes file name safe to use

Tags:

  • return - The sanitised string
  • access - public

Overridden in child classes as:

VFTPFile::makeSafe()
Makes file name safe to use

Parameters:

  • string $file - The name of the file [not full path]

[ Top ]

mktemp

string|object Filename mktemp( [string $prefix = 'php'], [string $dir = false])

[line 135]

Make a temporary file

Tags:

  • return - on success, error or warning otherwise
  • access - public

Overridden in child classes as:

VFTPFile::mktemp()
Make a temporary file

Parameters:

  • string $prefix - Filename prefix
  • string $dir - Directory to create file

[ Top ]

move

boolean|object True move( string $src, string $dest, [string $path = ''])

[line 285]

Moves a file

Tags:

  • return - on success, error or warning otherwise
  • access - public

Overridden in child classes as:

VFTPFile::move()
Moves a file

Parameters:

  • string $src - The path to the source file
  • string $dest - The path to the destination file
  • string $path - An optional base path to prefix to the file names

[ Top ]

read

mixed read( string $filename, [boolean $incpath = false], [int $amount = 0], [int $chunksize = 8192], [int $offset = 0])

[line 317]

Read the contents of a file

Tags:

  • return - Returns file contents on success, error or warning on failure
  • access - public

Overridden in child classes as:

VFTPFile::read()
Read the contents of a file

Parameters:

  • string $filename - The full file path
  • boolean $incpath - Use include path
  • int $amount - Amount of file to read
  • int $chunksize - Size of chunks to read
  • int $offset - Offset of the file

[ Top ]

stripExt

string stripExt( string $file)

[line 108]

Strips the last extension off a file name

Tags:

  • return - The file name without the extension
  • access - public

Overridden in child classes as:

VFTPFile::stripExt()
Strips the last extension off a file name

Parameters:

  • string $file - The file name

[ Top ]

upload

boolean upload( string $src, string $dest)

[line 367]

Moves an uploaded file to a destination folder

Tags:

  • return - True on success, error or warning otherwise
  • access - public

Overridden in child classes as:

VFTPFile::upload()
Moves an uploaded file to a destination folder

Parameters:

  • string $src - The name of the php (temporary) uploaded file
  • string $dest - The path (including filename) to move the uploaded file to

[ Top ]

write

boolean write( string $file, string $buffer)

[line 161]

Write contents to a file

Tags:

  • return - True on success
  • access - public

Overridden in child classes as:

VFTPFile::write()
Write contents to a file

Parameters:

  • string $file - The full file path
  • string $buffer - The buffer to write

[ Top ]


Class Constants


Documentation generated on Mon, 17 Jan 2011 01:57:16 -0600 by phpDocumentor 1.4.3