File¶
-
php\io\File
Class File
Constants
Methods
__construct
($path, $child = NULL)¶
Параметры:
- $path –
string
- $child –
null
,string
exists
()¶
Результат: bool
canExecute
()¶
Результат: bool
canWrite
()¶
Результат: bool
canRead
()¶
Результат: bool
getName
()¶
Результат: string
getAbsolutePath
()¶
Результат: string
getCanonicalPath
()¶throws php\io\IOException
Результат: string
getParent
()¶
Результат: string
getPath
()¶
Результат: string
getAbsoluteFile
()¶
Результат: php\io\File
getCanonicalFile
()¶throws php\io\IOException
Результат: php\io\File
getParentFile
()¶
Результат: php\io\File
mkdir
()¶
Результат: bool
mkdirs
()¶
Результат: bool
isFile
()¶
Результат: bool
isDirectory
()¶
Результат: bool
isAbsolute
()¶
Результат: bool
isHidden
()¶
Результат: bool
matches
($pattern)¶
Параметры:
- $pattern –
string
- the “glob” and “regex” syntaxes, and may support others.Результат:
bool
delete
()¶
Результат: bool
deleteOnExit
()¶
Результат: void
createNewFile
($withDirs = false)¶
Параметры:
- $withDirs –
bool
Результат:
bool
lastModified
()¶
Результат: int
length
()¶
Результат: int
crc32
()¶
Результат: int
,null
null if not exists or io exception
hash
($algorithm = 'MD5')¶
Параметры:
- $algorithm –
string
Результат:
string
,null
if not exists or io exception
renameTo
($newName)¶
Параметры:
- $newName –
string
Результат:
bool
setExecutable
($value, $ownerOnly = true)¶
Параметры:
- $value –
bool
- $ownerOnly –
bool
Результат:
bool
setWritable
($value, $ownerOnly = true)¶
Параметры:
- $value –
bool
- $ownerOnly –
bool
Результат:
bool
setReadable
($value, $ownerOnly = true)¶
Параметры:
- $value –
bool
- $ownerOnly –
bool
Результат:
bool
setReadOnly
()¶
Результат: bool
setLastModified
($time)¶
Параметры:
- $time –
int
Результат:
bool
compareTo
($file)¶
Параметры:
- $file –
string
, php\io\FileРезультат:
int
find
($filter = null)¶throws php\io\IOException
Параметры:
- $filter –
callable
Результат:
string[]
findFiles
($filter = null)¶throws php\io\IOException
Параметры:
- $filter –
callable
- (File $directory, $name)Результат:
- static
createTemp
($prefix, $suffix, $directory = null)¶
Параметры:
- $prefix –
string
- $suffix –
string
- $directory –
null
, php\io\File,string
Результат:
- static
listRoots
¶List the available filesystem roots. Returns an array of objects denoting the available filesystem roots, or empty array if the set of roots could not be determined. The array will be empty if there are no filesystem roots.
Результат: php\io\File[]
- static
of
($path)¶
Параметры:
- $path –
string
Результат: