Class: VFTPFile

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

Class Overview [line 39]

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

Virtual Web Platform - FTP File Support

Author(s):

Version:

Copyright:

  • (c) Ralph Ritoch - All Rights Reserved

Variables

Constants

Methods


Inherited Methods

Class: VFile

VFile::copy()
Copies a file
VFile::delete()
Delete a file or array of files
VFile::exists()
Check if file exists
VFile::getExt()
Gets the extension of a file name
VFile::getFolderInstance()
Get instance of Folder object
VFile::getInstance()
Get instance of File object
VFile::getMTime()
Get modification time
VFile::getName()
Returns the name, sans any path
VFile::makeSafe()
Makes file name safe to use
VFile::mktemp()
Make a temporary file
VFile::move()
Moves a file
VFile::read()
Read the contents of a file
VFile::stripExt()
Strips the last extension off a file name
VFile::upload()
Moves an uploaded file to a destination folder
VFile::write()
Write contents to a file

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 - FTP File Support

This class provides FTP File Support

Tags:

[ Top ]


Class Variables

$_client

[line 49]

FTP Client

Tags:

  • var - FTP Client
  • access - protected

Type: object

Overrides:

[ Top ]

$_vfolder

[line 58]

FTP Folder

Tags:

  • var - FTP Folder
  • access - protected

Type: VFTPFolder

Overrides:

[ Top ]


Class Methods

static getInstance

static VFTPFile &getInstance( &$client)

[line 67]

Get instance of File object

Tags:

  • return - File object
  • access - public

Overrides VFile::getInstance() (Get instance of File object)

Parameters:

  • &$client -

[ Top ]

__construct

VFTPFile __construct( &$filesystem, VFilesystem $filesystem)

[line 486]

Class constructor

Tags:

  • access - public

Overrides VFilesystemDriver::__construct() (Class Constructor)

Parameters:

[ Top ]

copy

boolean copy( string $src, string $dest, [string $path = null], [ $sourceSystem = null])

[line 269]

Copies a file

Tags:

  • return - True on success

Overrides VFile::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

boolean delete( mixed $file)

[line 318]

Delete a file or array of files

Tags:

  • return - True on success
  • access - public

Overrides VFile::delete() (Delete a file or array of files)

Parameters:

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

[ Top ]

exists

boolean exists( string $file)

[line 452]

Check if file exists

Tags:

  • return - True if path is a file
  • access - public

Overrides VFile::exists() (Check if file exists)

Parameters:

  • string $file - File path

[ Top ]

getExt

string|object The getExt( string $file)

[line 123]

Gets the extension of a file name

Tags:

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

Overrides VFile::getExt() (Gets the extension of a file name)

Parameters:

  • string $file - The file name

[ Top ]

getFolderInstance

VFTPFolder &getFolderInstance( )

[line 81]

Get instance of Folder object

Tags:

  • return - Folder object
  • access - public

Overrides VFile::getFolderInstance() (Get instance of Folder object)

Parameters:

[ Top ]

getMTime

integer|object Unix getMTime( string $file)

[line 99]

Get modification time

Tags:

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

Overrides VFile::getMTime() (Get modification time)

Parameters:

  • string $file - Filename

[ Top ]

getName

string getName( string $file)

[line 469]

Returns the name, sans any path

Tags:

  • return - filename

Overrides VFile::getName() (Returns the name, sans any path)

Parameters:

  • string $file - File path

[ Top ]

makeSafe

string makeSafe( string $file)

[line 153]

Makes file name safe to use

Tags:

  • return - The sanitised string
  • access - public

Overrides VFile::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 167]

Make a temporary file

Tags:

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

Overrides VFile::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 352]

Moves a file

Tags:

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

Overrides VFile::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 394]

Read the contents of a file

Tags:

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

Overrides VFile::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 140]

Strips the last extension off a file name

Tags:

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

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

Parameters:

  • string $file - The file name

[ Top ]

upload

boolean|object Returns upload( string $src, string $dest)

[line 438]

Moves an uploaded file to a destination folder

UNSUPPORTED!!!

Tags:

  • return - a warning as this method is not supported by this driver
  • access - public

Overrides VFile::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 239]

Write contents to a file

Tags:

  • return - True on success
  • access - public

Overrides VFile::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