Directory extends Directory implements IErrorable uses Error
Table of Contents
Interfaces
- IErrorable
Methods
- __construct() : mixed
- Constructor.
- copy() : bool
- Copy full structure of the folders with its contents.
- copyLangOnly() : bool
- Copy only language folders with content.
- create() : mixed
- createDirectory() : Directory
- createSubdirectory() : Directory|DirectoryEntry
- delete() : mixed
- deleteDirectory() : mixed
- generateTemporalDirectory() : self
- Creates temporal directory.
- getChildren() : array<string|int, mixed>|array<string|int, FileSystemEntry>
- getCreationTime() : mixed
- getDirectory() : mixed
- getDirectoryName() : mixed
- getLastAccessTime() : mixed
- getModificationTime() : mixed
- getName() : mixed
- getPath() : mixed
- getPermissions() : mixed
- getPhysicalPath() : mixed
- isDirectory() : mixed
- isDirectoryExists() : mixed
- isExists() : mixed
- isFile() : mixed
- isLink() : mixed
- isSystem() : mixed
- markWritable() : mixed
- rename() : mixed
- wipe() : bool
- Wipes folder out of children.
Methods
__construct()
Constructor.
public
__construct(string $path[, string|null $siteId = null ]) : mixed
Parameters
- $path : string
-
Folder path.
- $siteId : string|null = null
-
Site id.
copy()
Copy full structure of the folders with its contents.
public
copy(Directory $target[, bool $reWrite = true ][, bool $recursive = false ][, bool $convertEncoding = false ][, string $sourceEncoding = '' ][, string $targetEncoding = '' ]) : bool
Parameters
- $target : Directory
-
Destination folder.
- $reWrite : bool = true
-
Rewrire files.
- $recursive : bool = false
-
Recurcivly follow folder structure.
- $convertEncoding : bool = false
-
Allow encoding conver.
- $sourceEncoding : string = ''
-
Encoding of source files.
- $targetEncoding : string = ''
-
Target encoding.
Return values
boolcopyLangOnly()
Copy only language folders with content.
public
copyLangOnly(Directory $target, string $languageId[, bool $convertEncoding = false ][, string $sourceEncoding = '' ][, string $targetEncoding = '' ]) : bool
Parameters
- $target : Directory
-
Destination folder.
- $languageId : string
-
Language to filter.
- $convertEncoding : bool = false
-
Allow encoding conver.
- $sourceEncoding : string = ''
-
Encoding of source files.
- $targetEncoding : string = ''
-
Target encoding.
Return values
boolcreate()
public
create() : mixed
createDirectory()
public
static createDirectory(mixed $path) : Directory
Parameters
- $path : mixed
Return values
DirectorycreateSubdirectory()
public
createSubdirectory(mixed $name) : Directory|DirectoryEntry
Parameters
- $name : mixed
Return values
Directory|DirectoryEntrydelete()
public
delete() : mixed
deleteDirectory()
public
static deleteDirectory(mixed $path) : mixed
Parameters
- $path : mixed
generateTemporalDirectory()
Creates temporal directory.
public
static generateTemporalDirectory(string $prefix[, int $timeToLive = 3 ]) : self
Parameters
- $prefix : string
-
Name prefix.
- $timeToLive : int = 3
-
Hours to keep files alive.
Return values
selfgetChildren()
public
getChildren() : array<string|int, mixed>|array<string|int, FileSystemEntry>
Tags
Return values
array<string|int, mixed>|array<string|int, FileSystemEntry>getCreationTime()
public
getCreationTime() : mixed
getDirectory()
public
getDirectory() : mixed
getDirectoryName()
public
getDirectoryName() : mixed
getLastAccessTime()
public
getLastAccessTime() : mixed
getModificationTime()
public
getModificationTime() : mixed
getName()
public
getName() : mixed
getPath()
public
getPath() : mixed
getPermissions()
public
getPermissions() : mixed
getPhysicalPath()
public
getPhysicalPath() : mixed
isDirectory()
public
isDirectory() : mixed
isDirectoryExists()
public
static isDirectoryExists(mixed $path) : mixed
Parameters
- $path : mixed
isExists()
public
isExists() : mixed
isFile()
public
isFile() : mixed
isLink()
public
isLink() : mixed
isSystem()
public
isSystem() : mixed
markWritable()
public
markWritable() : mixed
rename()
public
rename(mixed $newPath) : mixed
Parameters
- $newPath : mixed
wipe()
Wipes folder out of children.
public
wipe([Closure|null $filter = null ]) : bool
Parameters
- $filter : Closure|null = null
-
Filter function.