phdfs 的语法
phdfs {
/* 属性 */
static $host;
static $port;
/* 方法 */
public bool connect( void )
public __construct( string $ip , string $port )
public bool copy( string $source_file , string $destination_file )
public bool create_directory( string $path )
public bool delete( string $path )
public void __destruct( void )
public bool disconnect( void )
public bool exists( string $path )
public array file_info( string $path )
public array list_directory( string $path [, int $level = 0 ] )
public string read( string $path [, int $length = 0 ] )
public bool rename( string $old_path , string $new_path )
public int tell( string $path [, int $read_length = 1024 ] )
public bool write( string $path , string $buffer [, int $mode = 0 ] )
}
phdfs::connect()
phdfs::connect() 函数在成功时返回 true,在失败时返回 false。
语法
public bool phdfs::connect( void )
phdfs::__construct()
语法
public phdfs::__construct( string $ip , string $port )
phdfs::copy()
phdfs::copy() 函数在成功时返回 true,在失败时返回 false。
语法
public bool phdfs::copy( string $source_file , string $destination_file )
phdfs::create_directory()
phdfs::create_directory() 函数在成功时返回 true,在失败时返回 false。
语法
public bool phdfs::create_directory( string $path )
phdfs::delete()
phdfs::delete() 函数在成功时返回 true,在失败时返回 false。
语法
public bool phdfs::delete ( string $path )
phdfs::__destruct()
phdfs::__destruct() 函数不返回任何值。
语法
public void phdfs::__destruct( void )
phdfs::disconnect()
phdfs::disconnect() 函数在成功时返回 true,在失败时返回 false。
语法
public bool phdfs::disconnect( void )
phdfs::exists()
phdfs::exists() 函数在成功时返回 true,在失败时返回 false。
语法
public bool phdfs::exists( string $path )
phdfs::file_info()
phdfs::file_info() 函数在成功时返回数组,在失败时返回 false。
语法
public array phdfs::file_info( string $path )
phdfs::list_directory()
phdfs::list_directory() 函数在成功时返回数组,在失败时返回 false。
语法
public array phdfs::list_directory( string $path [, int $level = 0 ] )
phdfs::read()
语法
public string phdfs::read( string $path [, int $length = 0 ] )
phdfs::rename()
phdfs::rename() 函数在成功时返回 true,在失败时返回 false。
语法
public bool phdfs::rename( string $old_path , string $new_path )
phdfs::tell()
语法
public int phdfs::tell( string $path [, int $read_length = 1024 ] )
phdfs::write()
phdfs::write() 函数在成功时返回 true,在失败时返回 false。
语法
public bool phdfs::write( string $path , string $buffer [, int $mode = 0 ] )