Definition at line 5 of file File.php.
◆ copy()
League\Flysystem\File::copy |
( |
|
$newpath | ) |
|
Copy the file.
- Parameters
-
- Returns
- File|false new file or false
Definition at line 134 of file File.php.
135 {
136 if ($this->filesystem->copy($this->path, $newpath)) {
137 return new File($this->filesystem, $newpath);
138 }
139
140 return false;
141 }
◆ delete()
League\Flysystem\File::delete |
( |
| ) |
|
Delete the file.
- Returns
- bool success boolean
Definition at line 198 of file File.php.
199 {
200 return $this->filesystem->delete($this->path);
201 }
◆ exists()
League\Flysystem\File::exists |
( |
| ) |
|
Check whether the file exists.
- Returns
- bool
Definition at line 12 of file File.php.
13 {
14 return $this->filesystem->has($this->path);
15 }
◆ getMetadata()
League\Flysystem\File::getMetadata |
( |
| ) |
|
Get the file's metadata.
- Returns
- array
Definition at line 178 of file File.php.
179 {
180 return $this->filesystem->getMetadata($this->path);
181 }
◆ getMimetype()
League\Flysystem\File::getMimetype |
( |
| ) |
|
Get the file's mimetype.
- Returns
- string mimetime
Definition at line 158 of file File.php.
159 {
160 return $this->filesystem->getMimetype($this->path);
161 }
◆ getSize()
League\Flysystem\File::getSize |
( |
| ) |
|
Get the file size.
- Returns
- int file size
Definition at line 188 of file File.php.
189 {
190 return $this->filesystem->getSize($this->path);
191 }
◆ getTimestamp()
League\Flysystem\File::getTimestamp |
( |
| ) |
|
Get the file's timestamp.
- Returns
- int unix timestamp
Definition at line 148 of file File.php.
149 {
150 return $this->filesystem->getTimestamp($this->path);
151 }
◆ getVisibility()
League\Flysystem\File::getVisibility |
( |
| ) |
|
Get the file's visibility.
- Returns
- string visibility
Definition at line 168 of file File.php.
169 {
170 return $this->filesystem->getVisibility($this->path);
171 }
◆ put()
League\Flysystem\File::put |
( |
|
$content | ) |
|
Create the file or update if exists.
- Parameters
-
- Returns
- bool success boolean
Definition at line 92 of file File.php.
93 {
94 return $this->filesystem->put($this->path, $content);
95 }
◆ putStream()
League\Flysystem\File::putStream |
( |
|
$resource | ) |
|
Create the file or update if exists using a stream.
- Parameters
-
- Returns
- bool success boolean
Definition at line 104 of file File.php.
105 {
106 return $this->filesystem->putStream($this->path, $resource);
107 }
◆ read()
League\Flysystem\File::read |
( |
| ) |
|
Read the file.
- Returns
- string file contents
Definition at line 22 of file File.php.
23 {
24 return $this->filesystem->read($this->path);
25 }
◆ readStream()
League\Flysystem\File::readStream |
( |
| ) |
|
Read the file as a stream.
- Returns
- resource file stream
Definition at line 32 of file File.php.
33 {
34 return $this->filesystem->readStream($this->path);
35 }
◆ rename()
League\Flysystem\File::rename |
( |
|
$newpath | ) |
|
Rename the file.
- Parameters
-
- Returns
- bool success boolean
Definition at line 116 of file File.php.
117 {
118 if ($this->filesystem->rename($this->path, $newpath)) {
119 $this->path = $newpath;
120
121 return true;
122 }
123
124 return false;
125 }
◆ update()
League\Flysystem\File::update |
( |
|
$content | ) |
|
Update the file contents.
- Parameters
-
- Returns
- bool success boolean
Definition at line 68 of file File.php.
69 {
70 return $this->filesystem->update($this->path, $content);
71 }
◆ updateStream()
League\Flysystem\File::updateStream |
( |
|
$resource | ) |
|
Update the file contents with a stream.
- Parameters
-
- Returns
- bool success boolean
Definition at line 80 of file File.php.
81 {
82 return $this->filesystem->updateStream($this->path, $resource);
83 }
◆ write()
League\Flysystem\File::write |
( |
|
$content | ) |
|
Write the new file.
- Parameters
-
- Returns
- bool success boolean
Definition at line 44 of file File.php.
45 {
46 return $this->filesystem->write($this->path, $content);
47 }
◆ writeStream()
League\Flysystem\File::writeStream |
( |
|
$resource | ) |
|
Write the new file using a stream.
- Parameters
-
- Returns
- bool success boolean
Definition at line 56 of file File.php.
57 {
58 return $this->filesystem->writeStream($this->path, $resource);
59 }
The documentation for this class was generated from the following file:
- libs/composer/vendor/league/flysystem/src/File.php