Skip to content

Latest commit

 

History

History
465 lines (324 loc) · 6.29 KB

File.md

File metadata and controls

465 lines (324 loc) · 6.29 KB

File

  • class File (php\io\File)
  • package std
  • source php/io/File.php

Description

Class File


Static Methods


Methods


Static Methods

createTemp()

File::createTemp(string $prefix, string $suffix, null|File|string $directory): File

listRoots()

File::listRoots(): File[]

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.


of()

File::of(string $path): File

Methods

__construct()

__construct(string $path, null|string $child): void

exists()

exists(): bool

canExecute()

canExecute(): bool

canWrite()

canWrite(): bool

canRead()

canRead(): bool

getName()

getName(): string

getAbsolutePath()

getAbsolutePath(): string

getCanonicalPath()

getCanonicalPath(): string

getParent()

getParent(): string

getPath()

getPath(): string

getAbsoluteFile()

getAbsoluteFile(): File

getCanonicalFile()

getCanonicalFile(): File

getParentFile()

getParentFile(): File

mkdir()

mkdir(): bool

mkdirs()

mkdirs(): bool

isFile()

isFile(): bool

isDirectory()

isDirectory(): bool

isAbsolute()

isAbsolute(): bool

isHidden()

isHidden(): bool

matches()

matches(string $pattern): bool

delete()

delete(): bool

deleteOnExit()

deleteOnExit(): void

createNewFile()

createNewFile(bool $withDirs): bool

lastModified()

lastModified(): int

length()

length(): int

crc32()

crc32(): int|null

toUrl()

toUrl(): string

hash()

hash(string $algorithm, callable $onProgress): null|string

renameTo()

renameTo(string $newName): bool

setExecutable()

setExecutable(bool $value, bool $ownerOnly): bool

setWritable()

setWritable(bool $value, bool $ownerOnly): bool

setReadable()

setReadable(bool $value, bool $ownerOnly): bool

setReadOnly()

setReadOnly(): bool

setLastModified()

setLastModified(int $time): bool

compareTo()

compareTo(string|File $file): int

find()

find(callable $filter): string[]

findFiles()

findFiles(callable $filter): File[]

open()

open(string $flags): php\io\Stream

parseAs()

parseAs(string $format, int $flags): mixed

formatTo()

formatTo(mixed $value, string $format, int $flags): void

__toString()

__toString(): string