Overview

Packages

  • Vfs

Classes

  • Horde_Vfs
  • Horde_Vfs_Base
  • Horde_Vfs_Browser
  • Horde_Vfs_Exception
  • Horde_Vfs_File
  • Horde_Vfs_Ftp
  • Horde_Vfs_Gc
  • Horde_Vfs_Horde
  • Horde_Vfs_Kolab
  • Horde_Vfs_ListItem
  • Horde_Vfs_Musql
  • Horde_Vfs_Object
  • Horde_Vfs_Smb
  • Horde_Vfs_Sql
  • Horde_Vfs_SqlFile
  • Horde_Vfs_Ssh2
  • Horde_Vfs_Translation
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Vfs_Smb

Stateless VFS implementation for a SMB server, based on smbclient.

Required values for $params:

username - (string)The username with which to connect to the SMB server.
password - (string) The password with which to connect to the SMB server.
hostspec - (string) The SMB server to connect to.
port' - (integer) The SMB port number to connect to.
share - (string) The share to access on the SMB server.
smbclient - (string) The path to the 'smbclient' executable.

Optional values for $params:

ipaddress - (string) The address of the server to connect to.

Functions not implemented: - changePermissions(): The SMB permission style does not fit with the module.

Codebase copyright 2002 Paul Gareau paul@xhawk.net. Adapted with permission by Patrice Levesque wayne@ptaff.ca from phpsmb-0.8 code, and converted to the LGPL. Please do not taunt original author, contact Patrice Levesque or dev@lists.horde.org.

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Horde_Vfs_Base
Extended by Horde_Vfs_Smb
Package: Vfs
Author: Paul Gareau paul@xhawk.net
Author: Patrice Levesque wayne@ptaff.ca
Located at Horde/Vfs/Smb.php
Methods summary
public integer
# size( string $path, string $name )

Retrieves the size of a file from the VFS.

Retrieves the size of a file from the VFS.

Parameters

$path
The pathname to the file.
$name
The filename to retrieve.

Returns

integer
The file size.

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::size()
public string
# read( string $path, string $name )

Retrieves a file from the VFS.

Retrieves a file from the VFS.

Parameters

$path
The pathname to the file.
$name
The filename to retrieve.

Returns

string
The file data.

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::read()
public string
# readFile( string $path, string $name )

Retrieves a file from the VFS as an on-disk local file.

Retrieves a file from the VFS as an on-disk local file.

This function provides a file on local disk with the data of a VFS file in it. This file cannot be modified! The behavior if you do modify it is undefined. It will be removed at the end of the request.

Parameters

$path
The pathname to the file.
$name
The filename to retrieve.

Returns

string
A local filename.

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::readFile()
public resource
# readStream( string $path, string $name )

Open a stream to a file in the VFS.

Open a stream to a file in the VFS.

Parameters

$path
The pathname to the file.
$name
The filename to retrieve.

Returns

resource
The stream.
public
# write( string $path, string $name, string $tmpFile, boolean $autocreate = false )

Stores a file in the VFS.

Stores a file in the VFS.

Parameters

$path
The path to store the file in.
$name
The filename to use.
$tmpFile
<p>The temporary file containing the data to be stored.</p>
$autocreate
Automatically create directories?

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::write()
public
# writeData( string $path, string $name, string $data, boolean $autocreate = false )

Stores a file in the VFS from raw data.

Stores a file in the VFS from raw data.

Parameters

$path
The path to store the file in.
$name
The filename to use.
$data
The file data.
$autocreate
Automatically create directories?

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::writeData()
public
# deleteFile( string $path, string $name )

Deletes a file from the VFS.

Deletes a file from the VFS.

Parameters

$path
The path to delete the file from.
$name
The filename to use.

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::deleteFile()
public boolean
# isFolder( string $path, string $name )

Checks if a given pathname is a folder.

Checks if a given pathname is a folder.

Parameters

$path
The path to the folder.
$name
The file or folder name.

Returns

boolean
True if it is a folder, false otherwise.

Overrides

Horde_Vfs_Base::isFolder()
public
# deleteFolder( string $path, string $name, boolean $recursive = false )

Deletes a folder from the VFS.

Deletes a folder from the VFS.

Parameters

$path
The path to delete the folder from.
$name
The name of the folder to delete.
$recursive
Force a recursive delete?

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::deleteFolder()
public
# rename( string $oldpath, string $oldname, string $newpath, string $newname )

Renames a file in the VFS.

Renames a file in the VFS.

Parameters

$oldpath
The old path to the file.
$oldname
The old filename.
$newpath
The new path of the file.
$newname
The new filename.

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::rename()
public
# createFolder( string $path, string $name )

Creates a folder on the VFS.

Creates a folder on the VFS.

Parameters

$path
The path of directory to create folder.
$name
The name of the new folder.

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::createFolder()
public array
# listFolder( string $path = '', mixed $filter = null, boolean $dotfiles = true, boolean $dironly = false, boolean $recursive = false )

Returns an unsorted file list.

Returns an unsorted file list.

Parameters

$path
<p>The path of the directory to get the file list for.</p>
$filter
Hash of items to filter based on filename.
$dotfiles
<p>Show dotfiles? This is irrelevant with smbclient.</p>
$dironly
Show directories only?
$recursive
Return all directory levels recursively?

Returns

array
File list.

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::listFolder()
public
# parseListing( mixed $res, mixed $filter, mixed $dotfiles, mixed $dironly )
public array
# listFolders( string $path = '', mixed $filter = null, boolean $dotfolders = true )

Returns a sorted list of folders in specified directory.

Returns a sorted list of folders in specified directory.

Parameters

$path
<p>The path of the directory to get the directory list for.</p>
$filter
Hash of items to filter based on folderlist.
$dotfolders
Include dotfolders? Irrelevant for SMB.

Returns

array
Folder list.

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::listFolders()
public
# copy( string $path, string $name, string $dest, boolean $autocreate = false )

Copies a file through the backend.

Copies a file through the backend.

Parameters

$path
The path to store the file in.
$name
The filename to use.
$dest
The destination of the file.
$autocreate
Automatically create directories?

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::copy()
public
# move( string $path, string $name, string $dest, boolean $autocreate = false )

Moves a file through the backend.

Moves a file through the backend.

Parameters

$path
The path to store the file in.
$name
The filename to use.
$dest
The destination of the file.
$autocreate
Automatically create directories?

Throws

Horde_Vfs_Exception

Overrides

Horde_Vfs_Base::move()
Methods inherited from Horde_Vfs_Base
__construct(), autocreatePath(), changePermissions(), checkCredentials(), delete(), emptyFolder(), exists(), getCurrentDirectory(), getFolderSize(), getModifiablePermissions(), getParam(), getQuota(), getRequiredCredentials(), getVFSSize(), readByteRange(), setParams(), setQuota(), setQuotaRoot()
API documentation generated by ApiGen