PHP Class Nette\Utils\FileSystem

Mostra file Open project: nette/utils Class Usage Examples

Public Methods

Method Description
copy ( $source, $dest, $overwrite = TRUE ) : void Copies a file or directory.
createDir ( $dir, $mode = 511 ) : void Creates a directory.
delete ( $path ) : void Deletes a file or directory.
isAbsolute ( $path ) : boolean Is path absolute?
read ( $file ) : string Reads file content.
rename ( $name, $newName, $overwrite = TRUE ) : void Renames a file or directory.
write ( $file, $content, $mode = 438 ) : void Writes a string to a file.

Method Details

copy() public static method

Copies a file or directory.
public static copy ( $source, $dest, $overwrite = TRUE ) : void
return void

createDir() public static method

Creates a directory.
public static createDir ( $dir, $mode = 511 ) : void
return void

delete() public static method

Deletes a file or directory.
public static delete ( $path ) : void
return void

isAbsolute() public static method

Is path absolute?
public static isAbsolute ( $path ) : boolean
return boolean

read() public static method

Reads file content.
public static read ( $file ) : string
return string

rename() public static method

Renames a file or directory.
public static rename ( $name, $newName, $overwrite = TRUE ) : void
return void

write() public static method

Writes a string to a file.
public static write ( $file, $content, $mode = 438 ) : void
return void