Files
Table of Contents
- $defCHMOD : int
- Default chmod.
- $mineTypes : array<string|int, mixed>
- Mine Types of files.
- $recursiveDirectories : bool
- The default value for recursive create dirs.
- $types : array<string|int, mixed>
- Types.
- __construct() : mixed
- __construct.
- addExt() : void
- Add the extemsio.
- addMineTypes() : void
- Add the mine type.
- changeDefaultChmod() : int
- Change the default chmod.
- chown() : bool
- Change the owner of an array of files.
- copyDir() : void
- Copy dir.
- copyDirs() : void
- Copy dirs.
- copyFile() : void
- Copy file.
- copyFiles() : void
- Copy files.
- deleteDir() : bool
- Delete dir.
- deleteDirs() : void
- Delete dirs.
- deleteFile() : void
- Delete file.
- deleteFiles() : void
- Delete files.
- filesUpload() : void
- Upload files.
- fileUpload() : mixed
- Upload file.
- mkDir() : bool
- Make the dir.
- moveDir() : void
- Move dir.
- moveDirs() : void
- Move dirs.
- moveFile() : void
- Move file.
- moveFiles() : void
- Move files.
- permission() : bool
- Change the permission.
- recursiveCreateDir() : bool
- Create recurisve dir.
- systemDirs() : bool
- Create alphaz system dir.
- touch() : bool
- Sets access and modification time of file.
Properties
$defCHMOD
Default chmod.
private
int
$defCHMOD
= 0755
Tags
$mineTypes
Mine Types of files.
private
array<string|int, mixed>
$mineTypes
= []
Tags
$recursiveDirectories
The default value for recursive create dirs.
private
bool
$recursiveDirectories
= true
Tags
$types
Types.
private
array<string|int, mixed>
$types
= []
Tags
Methods
__construct()
__construct.
public
__construct(array<string|int, mixed> $mines, array<string|int, mixed> $extensions) : mixed
Parameters
- $mines : array<string|int, mixed>
- $extensions : array<string|int, mixed>
Tags
Return values
mixed —addExt()
Add the extemsio.
public
addExt((string) $type, mixed $ext) : void
Parameters
- $type : (string)
-
Correct type.
- $ext : mixed
Tags
Return values
void —addMineTypes()
Add the mine type.
public
addMineTypes((string) $type) : void
Parameters
- $type : (string)
-
Correct mine type.
Tags
Return values
void —changeDefaultChmod()
Change the default chmod.
public
changeDefaultChmod(mixed $chmod) : int
Parameters
- $chmod : mixed
Tags
Return values
int —chown()
Change the owner of an array of files.
public
chown((string) $source, (array) $files, (mixed) $user) : bool
Parameters
- $source : (string)
-
Name of file or directory with path.
- $files : (array)
-
Files to be copy.
- $user : (mixed)
-
The new owner user name.
Tags
Return values
bool —copyDir()
Copy dir.
public
copyDir((string) $source, (string) $target, (string) $dir) : void
Parameters
- $source : (string)
-
Directory with path.
- $target : (string)
-
Target directory.
- $dir : (string)
-
Directory to be copied.
Tags
Return values
void —copyDirs()
Copy dirs.
public
copyDirs((string) $source, (string) $target, (array) $dirs) : void
Parameters
- $source : (string)
-
Directory with path.
- $target : (string)
-
Target directory.
- $dirs : (array)
-
Directories to be copied.
Tags
Return values
void —copyFile()
Copy file.
public
copyFile((string) $source, (string) $target, mixed $file) : void
Parameters
- $source : (string)
-
Name of file or directory with path.
- $target : (string)
-
Target directory.
- $file : mixed
Tags
Return values
void —copyFiles()
Copy files.
public
copyFiles((string) $source, (string) $target, (array) $files) : void
Parameters
- $source : (string)
-
Name of file or directory with path.
- $target : (string)
-
Target directory.
- $files : (array)
-
Files to be copy.
Tags
Return values
void —deleteDir()
Delete dir.
public
deleteDir((string) $dir) : bool
Parameters
- $dir : (string)
-
Directory with path.
Tags
Return values
bool —deleteDirs()
Delete dirs.
public
deleteDirs((array) $dirs) : void
Parameters
- $dirs : (array)
-
Directory with path.
Tags
Return values
void —deleteFile()
Delete file.
public
deleteFile((string) $file) : void
Parameters
- $file : (string)
-
Name of file with path.
Tags
Return values
void —deleteFiles()
Delete files.
public
deleteFiles(mixed $files) : void
Parameters
- $files : mixed
Tags
Return values
void —filesUpload()
Upload files.
public
filesUpload((array) $files, (string) $target, (string) $fileType, (int) $count[, (int) $maxSize = 7992000000 ]) : void
Parameters
- $files : (array)
-
Files to be uploaded.
- $target : (string)
-
Target where file should be upload.
- $fileType : (string)
-
Supported => image,media,docs,zip.
- $count : (int)
-
Number of file count.
- $maxSize : (int) = 7992000000
-
File size to be allowed.
Tags
Return values
void —fileUpload()
Upload file.
public
fileUpload((string) $file, (string) $target, (string) $fileType[, (int) $maxSize = 7992000000 ]) : mixed
Parameters
- $file : (string)
-
File to be uploaded.
- $target : (string)
-
Target where file should be uploaded.
- $fileType : (string)
-
Supported => image,media,docs,zip.
- $maxSize : (int) = 7992000000
-
File size to be allowed.
Tags
Return values
mixed —mkDir()
Make the dir.
public
mkDir((string) $name[, (string) $recursive = null ][, (string) $chmod = null ]) : bool
Parameters
- $name : (string)
-
Name of dir with path.
- $recursive : (string) = null
-
Recursive mode create: null|true|false.
- $chmod : (string) = null
-
Directory permission on create: default 0755.
Tags
Return values
bool —moveDir()
Move dir.
public
moveDir((string) $source, (string) $target, (string) $dir) : void
Parameters
- $source : (string)
-
Directory with path.
- $target : (string)
-
Target directory.
- $dir : (string)
-
Directory to be copied.
Tags
Return values
void —moveDirs()
Move dirs.
public
moveDirs((string) $source, (string) $target, (array) $dirs) : void
Parameters
- $source : (string)
-
Directory with path.
- $target : (string)
-
Target directory.
- $dirs : (array)
-
Dirs to be copy.
Tags
Return values
void —moveFile()
Move file.
public
moveFile((string) $source, (string) $target, (string) $file) : void
Parameters
- $source : (string)
-
Name of file or directory with path.
- $target : (string)
-
Target directory.
- $file : (string)
-
Files to be moved.
Tags
Return values
void —moveFiles()
Move files.
public
moveFiles((string) $source, (string) $target, (array|string) $files) : void
Parameters
- $source : (string)
-
Name of file or directory with path.
- $target : (string)
-
Target directory.
- $files : (array|string)
-
Files to be moved.
Tags
Return values
void —permission()
Change the permission.
public
permission((string) $source, (mixed) $pre) : bool
Parameters
- $source : (string)
-
Name of file or directory with path.
- $pre : (mixed)
-
Valid permission.
Tags
Return values
bool —recursiveCreateDir()
Create recurisve dir.
public
recursiveCreateDir([mixed $value = null ]) : bool
Parameters
- $value : mixed = null
-
recursive status true|false.
Tags
Return values
bool —systemDirs()
Create alphaz system dir.
public
systemDirs() : bool
Tags
Return values
bool —touch()
Sets access and modification time of file.
public
touch((string) $source, (array) $files[, (int) $time = null ][, (int) $atime = null ]) : bool
Parameters
- $source : (string)
-
Name of file or directory with path.
- $files : (array)
-
Files to be copy.
- $time : (int) = null
-
The touch time as a Unix timestamp.
- $atime : (int) = null
-
The access time as a Unix timestamp.