Cloud
extends
Filesystem
in
Table of Contents
- VISIBILITY_PRIVATE = 'private'
- The private visibility setting.
- VISIBILITY_PUBLIC = 'public'
- The public visibility setting.
- allDirectories() : array<string|int, mixed>
- Get all (recursive) of the directories within a given directory.
- allFiles() : array<string|int, mixed>
- Get all of the files from the given directory (recursive).
- append() : int
- Append to a file.
- copy() : bool
- Copy a file to a new location.
- delete() : bool
- Delete the file at a given path.
- deleteDirectory() : bool
- Recursively delete a directory.
- directories() : array<string|int, mixed>
- Get all of the directories within a given directory.
- exists() : bool
- Determine if a file exists.
- files() : array<string|int, mixed>
- Get an array of all files in a directory.
- get() : string
- Get the contents of a file.
- getVisibility() : string
- Get the visibility for the given path.
- lastModified() : int
- Get the file's last modification time.
- makeDirectory() : bool
- Create a directory.
- move() : bool
- Move a file to a new location.
- prepend() : int
- Prepend to a file.
- put() : bool
- Write the contents of a file.
- setVisibility() : void
- Set the visibility for the given path.
- size() : int
- Get the file size of a given file.
- url() : string
- Get the URL for the file at the given path.
Constants
VISIBILITY_PRIVATE
The private visibility setting.
public
string
VISIBILITY_PRIVATE
= 'private'
VISIBILITY_PUBLIC
The public visibility setting.
public
string
VISIBILITY_PUBLIC
= 'public'
Methods
allDirectories()
Get all (recursive) of the directories within a given directory.
public
allDirectories([string|null $directory = null ]) : array<string|int, mixed>
Parameters
- $directory : string|null = null
Return values
array<string|int, mixed> —allFiles()
Get all of the files from the given directory (recursive).
public
allFiles([string|null $directory = null ]) : array<string|int, mixed>
Parameters
- $directory : string|null = null
Return values
array<string|int, mixed> —append()
Append to a file.
public
append(string $path, string $data) : int
Parameters
- $path : string
- $data : string
Return values
int —copy()
Copy a file to a new location.
public
copy(string $from, string $to) : bool
Parameters
- $from : string
- $to : string
Return values
bool —delete()
Delete the file at a given path.
public
delete(string|array<string|int, mixed> $paths) : bool
Parameters
- $paths : string|array<string|int, mixed>
Return values
bool —deleteDirectory()
Recursively delete a directory.
public
deleteDirectory(string $directory) : bool
Parameters
- $directory : string
Return values
bool —directories()
Get all of the directories within a given directory.
public
directories([string|null $directory = null ][, bool $recursive = false ]) : array<string|int, mixed>
Parameters
- $directory : string|null = null
- $recursive : bool = false
Return values
array<string|int, mixed> —exists()
Determine if a file exists.
public
exists(string $path) : bool
Parameters
- $path : string
Return values
bool —files()
Get an array of all files in a directory.
public
files([string|null $directory = null ][, bool $recursive = false ]) : array<string|int, mixed>
Parameters
- $directory : string|null = null
- $recursive : bool = false
Return values
array<string|int, mixed> —get()
Get the contents of a file.
public
get(string $path) : string
Parameters
- $path : string
Tags
Return values
string —getVisibility()
Get the visibility for the given path.
public
getVisibility(string $path) : string
Parameters
- $path : string
Return values
string —lastModified()
Get the file's last modification time.
public
lastModified(string $path) : int
Parameters
- $path : string
Return values
int —makeDirectory()
Create a directory.
public
makeDirectory(string $path) : bool
Parameters
- $path : string
Return values
bool —move()
Move a file to a new location.
public
move(string $from, string $to) : bool
Parameters
- $from : string
- $to : string
Return values
bool —prepend()
Prepend to a file.
public
prepend(string $path, string $data) : int
Parameters
- $path : string
- $data : string
Return values
int —put()
Write the contents of a file.
public
put(string $path, string|resource $contents[, mixed $options = [] ]) : bool
Parameters
- $path : string
- $contents : string|resource
- $options : mixed = []
Return values
bool —setVisibility()
Set the visibility for the given path.
public
setVisibility(string $path, string $visibility) : void
Parameters
- $path : string
- $visibility : string
Return values
void —size()
Get the file size of a given file.
public
size(string $path) : int
Parameters
- $path : string
Return values
int —url()
Get the URL for the file at the given path.
public
url(string $path) : string
Parameters
- $path : string