Class Dir

Description

Implements interfaces:

  • IteratorAggregate (internal interface)

DirectoryIterator实现类 PHP5以上内置了DirectoryIterator类

Located in /ORG/Io/Dir.class.php (line 24)

Base
   |
   --Dir
Direct descendents
Class Description
DirectoryIterator DirectoryIterator实现类 PHP5以上内置了DirectoryIterator类
Method Summary
Dir __construct (string $path, [ $pattern = '*'])
void copyDir ( $source,  $destination)
void del ( $directory)
void delDir ( $directory, [ $subdir = true])
integer getATime ()
integer getCTime ()
string getFilename ()
integer getGroup ()
integer getInode ()
string getIterator ()
void getList ( $directory)
integer getMTime ()
string getOwner ()
string getPath ()
string getPathname ()
integer getPerms ()
integer getSize ()
string getType ()
boolen isDir ()
void isEmpty ( $directory)
boolen isExecutable ()
boolen isFile ()
boolen isLink ()
boolen isReadable ()
void listFile (mixed $pathname, [ $pattern = '*'])
void toArray ()
Methods
Constructor __construct (line 37)

架构函数

  • access: public
Dir __construct (string $path, [ $pattern = '*'])
  • string $path: 目录路径
  • $pattern
copyDir (line 495)

复制目录

void copyDir ( $source,  $destination)
  • $source
  • $destination
del (line 469)

删除目录下面的所有文件,但不删除目录

void del ( $directory)
  • $directory
delDir (line 437)

删除目录(包括下面的文件)

void delDir ( $directory, [ $subdir = true])
  • $directory
  • $subdir
getATime (line 103)

文件上次访问时间

  • access: public
integer getATime ()
getChildren (line 133)

遍历子目录文件信息

  • access: public
DirectoryIterator getChildren ()
getCTime (line 118)

取得文件的 inode 修改时间

  • access: public
integer getCTime ()
getFilename (line 151)

取得文件名

  • access: public
string getFilename ()
getGroup (line 166)

取得文件的组

  • access: public
integer getGroup ()
getInode (line 181)

取得文件的 inode

  • access: public
integer getInode ()
getIterator (line 378)

获取foreach的遍历方式

  • access: public
string getIterator ()

Implementation of:
IteratorAggregate::getIterator
getList (line 423)

取得目录中的结构信息

void getList ( $directory)
  • $directory
getMTime (line 196)

取得文件的上次修改时间

  • access: public
integer getMTime ()
getOwner (line 211)

取得文件的所有者

  • access: public
string getOwner ()
getPath (line 226)

取得文件路径,不包括文件名

  • access: public
string getPath ()
getPathname (line 241)

取得文件的完整路径,包括文件名

  • access: public
string getPathname ()
getPerms (line 256)

取得文件的权限

  • access: public
integer getPerms ()
getSize (line 271)

取得文件的大小

  • access: public
integer getSize ()
getType (line 286)

取得文件类型

  • access: public
string getType ()
isDir (line 301)

是否为目录

  • access: public
boolen isDir ()
isEmpty (line 399)

判断目录是否为空

void isEmpty ( $directory)
  • $directory
isExecutable (line 347)

文件是否可以执行

  • access: public
boolen isExecutable ()
isFile (line 316)

是否为文件

  • access: public
boolen isFile ()
isLink (line 331)

文件是否为一个符号连接

  • access: public
boolen isLink ()
isReadable (line 363)

文件是否可读

  • access: public
boolen isReadable ()
listFile (line 52)

取得目录下面的文件信息

  • access: public
void listFile (mixed $pathname, [ $pattern = '*'])
  • mixed $pathname: 路径
  • $pattern
toArray (line 384)
void toArray ()

Documentation generated on Thu, 27 Mar 2008 08:20:41 +0000 by 塞北的雪