PHP 클래스 Dir, thinksns

파일 보기 프로젝트 열기: medz/thinksns-4 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $path, $pattern = '*' ) +---------------------------------------------------------- 架构函数 +---------------------------------------------------------- +----------------------------------------------------------
copyDir ( $source, $destination ) +---------------------------------------------------------- 复制目录 +---------------------------------------------------------- +---------------------------------------------------------- +----------------------------------------------------------
del ( $directory ) +---------------------------------------------------------- 删除目录下面的所有文件,但不删除目录 +---------------------------------------------------------- +---------------------------------------------------------- +----------------------------------------------------------
delDir ( $directory, $subdir = true ) +---------------------------------------------------------- 删除目录(包括下面的文件) +---------------------------------------------------------- +---------------------------------------------------------- +----------------------------------------------------------
getATime ( ) : integer +---------------------------------------------------------- 文件上次访问时间 +---------------------------------------------------------- +----------------------------------------------------------
getCTime ( ) : integer +---------------------------------------------------------- 取得文件的 inode 修改时间 +---------------------------------------------------------- +----------------------------------------------------------
getChildren ( ) : DirectoryIterator +---------------------------------------------------------- 遍历子目录文件信息 +---------------------------------------------------------- +----------------------------------------------------------
getFilename ( ) : string +---------------------------------------------------------- 取得文件名 +---------------------------------------------------------- +----------------------------------------------------------
getGroup ( ) : integer +---------------------------------------------------------- 取得文件的组 +---------------------------------------------------------- +----------------------------------------------------------
getInode ( ) : integer +---------------------------------------------------------- 取得文件的 inode +---------------------------------------------------------- +----------------------------------------------------------
getIterator ( ) : string +---------------------------------------------------------- 获取foreach的遍历方式 +---------------------------------------------------------- +----------------------------------------------------------
getList ( $directory ) +---------------------------------------------------------- 取得目录中的结构信息 +---------------------------------------------------------- +---------------------------------------------------------- +----------------------------------------------------------
getMTime ( ) : integer +---------------------------------------------------------- 取得文件的上次修改时间 +---------------------------------------------------------- +----------------------------------------------------------
getOwner ( ) : string +---------------------------------------------------------- 取得文件的所有者 +---------------------------------------------------------- +----------------------------------------------------------
getPath ( ) : string +---------------------------------------------------------- 取得文件路径,不包括文件名 +---------------------------------------------------------- +----------------------------------------------------------
getPathname ( ) : string +---------------------------------------------------------- 取得文件的完整路径,包括文件名 +---------------------------------------------------------- +----------------------------------------------------------
getPerms ( ) : integer +---------------------------------------------------------- 取得文件的权限 +---------------------------------------------------------- +----------------------------------------------------------
getSize ( ) : integer +---------------------------------------------------------- 取得文件的大小 +---------------------------------------------------------- +----------------------------------------------------------
getType ( ) : string +---------------------------------------------------------- 取得文件类型 +---------------------------------------------------------- +----------------------------------------------------------
isDir ( ) : boolen +---------------------------------------------------------- 是否为目录 +---------------------------------------------------------- +----------------------------------------------------------
isEmpty ( $directory ) +---------------------------------------------------------- 判断目录是否为空 +---------------------------------------------------------- +---------------------------------------------------------- +----------------------------------------------------------
isExecutable ( ) : boolen +---------------------------------------------------------- 文件是否可以执行 +---------------------------------------------------------- +----------------------------------------------------------
isFile ( ) : boolen +---------------------------------------------------------- 是否为文件 +---------------------------------------------------------- +----------------------------------------------------------
isLink ( ) : boolen +---------------------------------------------------------- 文件是否为一个符号连接 +---------------------------------------------------------- +----------------------------------------------------------
isReadable ( ) : boolen +---------------------------------------------------------- 文件是否可读 +---------------------------------------------------------- +----------------------------------------------------------
listFile ( mixed $pathname, $pattern = '*' ) +---------------------------------------------------------- 取得目录下面的文件信息 +---------------------------------------------------------- +----------------------------------------------------------
toArray ( ) 返回目录的数组信息

메소드 상세

__construct() 공개 메소드

+---------------------------------------------------------- 架构函数 +---------------------------------------------------------- +----------------------------------------------------------
public __construct ( string $path, $pattern = '*' )
$path string 目录路径 +----------------------------------------------------------

copyDir() 공개 메소드

+---------------------------------------------------------- 复制目录 +---------------------------------------------------------- +---------------------------------------------------------- +----------------------------------------------------------
public copyDir ( $source, $destination )

del() 공개 메소드

+---------------------------------------------------------- 删除目录下面的所有文件,但不删除目录 +---------------------------------------------------------- +---------------------------------------------------------- +----------------------------------------------------------
public del ( $directory )

delDir() 공개 메소드

+---------------------------------------------------------- 删除目录(包括下面的文件) +---------------------------------------------------------- +---------------------------------------------------------- +----------------------------------------------------------
public delDir ( $directory, $subdir = true )

getATime() 공개 메소드

+---------------------------------------------------------- 文件上次访问时间 +---------------------------------------------------------- +----------------------------------------------------------
public getATime ( ) : integer
리턴 integer +----------------------------------------------------------

getCTime() 공개 메소드

+---------------------------------------------------------- 取得文件的 inode 修改时间 +---------------------------------------------------------- +----------------------------------------------------------
public getCTime ( ) : integer
리턴 integer +----------------------------------------------------------

getChildren() 공개 메소드

+---------------------------------------------------------- 遍历子目录文件信息 +---------------------------------------------------------- +----------------------------------------------------------
public getChildren ( ) : DirectoryIterator
리턴 DirectoryIterator +----------------------------------------------------------

getFilename() 공개 메소드

+---------------------------------------------------------- 取得文件名 +---------------------------------------------------------- +----------------------------------------------------------
public getFilename ( ) : string
리턴 string +----------------------------------------------------------

getGroup() 공개 메소드

+---------------------------------------------------------- 取得文件的组 +---------------------------------------------------------- +----------------------------------------------------------
public getGroup ( ) : integer
리턴 integer +----------------------------------------------------------

getInode() 공개 메소드

+---------------------------------------------------------- 取得文件的 inode +---------------------------------------------------------- +----------------------------------------------------------
public getInode ( ) : integer
리턴 integer +----------------------------------------------------------

getIterator() 공개 메소드

+---------------------------------------------------------- 获取foreach的遍历方式 +---------------------------------------------------------- +----------------------------------------------------------
public getIterator ( ) : string
리턴 string +----------------------------------------------------------

getList() 공개 메소드

+---------------------------------------------------------- 取得目录中的结构信息 +---------------------------------------------------------- +---------------------------------------------------------- +----------------------------------------------------------
public getList ( $directory )

getMTime() 공개 메소드

+---------------------------------------------------------- 取得文件的上次修改时间 +---------------------------------------------------------- +----------------------------------------------------------
public getMTime ( ) : integer
리턴 integer +----------------------------------------------------------

getOwner() 공개 메소드

+---------------------------------------------------------- 取得文件的所有者 +---------------------------------------------------------- +----------------------------------------------------------
public getOwner ( ) : string
리턴 string +----------------------------------------------------------

getPath() 공개 메소드

+---------------------------------------------------------- 取得文件路径,不包括文件名 +---------------------------------------------------------- +----------------------------------------------------------
public getPath ( ) : string
리턴 string +----------------------------------------------------------

getPathname() 공개 메소드

+---------------------------------------------------------- 取得文件的完整路径,包括文件名 +---------------------------------------------------------- +----------------------------------------------------------
public getPathname ( ) : string
리턴 string +----------------------------------------------------------

getPerms() 공개 메소드

+---------------------------------------------------------- 取得文件的权限 +---------------------------------------------------------- +----------------------------------------------------------
public getPerms ( ) : integer
리턴 integer +----------------------------------------------------------

getSize() 공개 메소드

+---------------------------------------------------------- 取得文件的大小 +---------------------------------------------------------- +----------------------------------------------------------
public getSize ( ) : integer
리턴 integer +----------------------------------------------------------

getType() 공개 메소드

+---------------------------------------------------------- 取得文件类型 +---------------------------------------------------------- +----------------------------------------------------------
public getType ( ) : string
리턴 string +----------------------------------------------------------

isDir() 공개 메소드

+---------------------------------------------------------- 是否为目录 +---------------------------------------------------------- +----------------------------------------------------------
public isDir ( ) : boolen
리턴 boolen +----------------------------------------------------------

isEmpty() 공개 메소드

+---------------------------------------------------------- 判断目录是否为空 +---------------------------------------------------------- +---------------------------------------------------------- +----------------------------------------------------------
public isEmpty ( $directory )

isExecutable() 공개 메소드

+---------------------------------------------------------- 文件是否可以执行 +---------------------------------------------------------- +----------------------------------------------------------
public isExecutable ( ) : boolen
리턴 boolen +----------------------------------------------------------

isFile() 공개 메소드

+---------------------------------------------------------- 是否为文件 +---------------------------------------------------------- +----------------------------------------------------------
public isFile ( ) : boolen
리턴 boolen +----------------------------------------------------------

isReadable() 공개 메소드

+---------------------------------------------------------- 文件是否可读 +---------------------------------------------------------- +----------------------------------------------------------
public isReadable ( ) : boolen
리턴 boolen +----------------------------------------------------------

listFile() 공개 메소드

+---------------------------------------------------------- 取得目录下面的文件信息 +---------------------------------------------------------- +----------------------------------------------------------
public listFile ( mixed $pathname, $pattern = '*' )
$pathname mixed 路径 +----------------------------------------------------------

toArray() 공개 메소드

返回目录的数组信息
public toArray ( )