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,nullnull if not exists or io exception
hash($algorithm = 'MD5')¶
Параметры:
- $algorithm –
stringРезультат:
string,nullif 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Результат: