1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* This file is part of Blitz PHP framework. |
5
|
|
|
* |
6
|
|
|
* (c) 2022 Dimitri Sitchet Tomkeu <[email protected]> |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view |
9
|
|
|
* the LICENSE file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace BlitzPHP\Facades; |
13
|
|
|
|
14
|
|
|
use BlitzPHP\Container\Services; |
15
|
|
|
use BlitzPHP\Filesystem\FilesystemManager; |
16
|
|
|
use Closure; |
17
|
|
|
use DateTimeInterface; |
18
|
|
|
use League\Flysystem\DirectoryListing; |
19
|
|
|
use League\Flysystem\FilesystemAdapter; |
20
|
|
|
use League\Flysystem\FilesystemOperator; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* @method static array allDirectories(string|null $directory = null) |
24
|
|
|
* @method static array allFiles(string|null $directory = null) |
25
|
|
|
* @method static bool append(string $path, string $data) |
26
|
|
|
* @method static \BlitzPHP\Filesystem\FilesystemInterface build(array|string $config) |
27
|
|
|
* @method static void buildTemporaryUrlsUsing(Closure $callback) |
28
|
|
|
* @method static string|false checksum(string $path, array $options = []) |
29
|
|
|
* @method static \BlitzPHP\Filesystem\FilesystemInterface cloud() |
30
|
|
|
* @method static bool copy(string $from, string $to) |
31
|
|
|
* @method static void createDirectory(string $location, array $config = []) |
32
|
|
|
* @method static \BlitzPHP\Filesystem\FilesystemInterface createFtpDriver(array $config) |
33
|
|
|
* @method static \BlitzPHP\Filesystem\FilesystemInterface createLocalDriver(array $config) |
34
|
|
|
* @method static \BlitzPHP\Filesystem\FilesystemInterface createS3Driver(array $config) |
35
|
|
|
* @method static \BlitzPHP\Filesystem\FilesystemInterface createScopedDriver(array $config) |
36
|
|
|
* @method static \BlitzPHP\Filesystem\FilesystemInterface createSftpDriver(array $config) |
37
|
|
|
* @method static bool delete(array|string $paths) |
38
|
|
|
* @method static bool deleteDirectory(string $directory) |
39
|
|
|
* @method static array directories(string|null $directory = null, bool $recursive = false) |
40
|
|
|
* @method static bool directoryExists(string $path) |
41
|
|
|
* @method static bool directoryMissing(string $path) |
42
|
|
|
* @method static \BlitzPHP\Filesystem\FilesystemInterface disk(string|null $name = null) |
43
|
|
|
* @method static \Symfony\Component\HttpFoundation\StreamedResponse download(string $path, string|null $name = null, array $headers = []) |
44
|
|
|
* @method static \BlitzPHP\Filesystem\FilesystemInterface drive(string|null $name = null) |
45
|
|
|
* @method static bool exists(string $path) |
46
|
|
|
* @method static FilesystemManager extend(string $driver, Closure $callback) |
47
|
|
|
* @method static bool fileExists(string $path) |
48
|
|
|
* @method static bool fileMissing(string $path) |
49
|
|
|
* @method static array files(string|null $directory = null, bool $recursive = false) |
50
|
|
|
* @method static int fileSize(string $path) |
51
|
|
|
* @method static void flushMacros() |
52
|
|
|
* @method static FilesystemManager forgetDisk((array | string) $disk) |
53
|
|
|
* @method static string|null get(string $path) |
54
|
|
|
* @method static FilesystemAdapter getAdapter() |
55
|
|
|
* @method static array getConfig() |
56
|
|
|
* @method static string getDefaultCloudDriver() |
57
|
|
|
* @method static string getDefaultDriver() |
58
|
|
|
* @method static FilesystemOperator getDriver() |
59
|
|
|
* @method static string getVisibility(string $path) |
60
|
|
|
* @method static bool has(string $location) |
61
|
|
|
* @method static bool hasMacro(string $name) |
62
|
|
|
* @method static int lastModified(string $path) |
63
|
|
|
* @method static DirectoryListing listContents(string $location, bool $deep = false) |
64
|
|
|
* @method static void macro(string $name, callable|object $macro) |
65
|
|
|
* @method static mixed macroCall(string $method, array $parameters) |
66
|
|
|
* @method static bool makeDirectory(string $path) |
67
|
|
|
* @method static string|false mimeType(string $path) |
68
|
|
|
* @method static bool missing(string $path) |
69
|
|
|
* @method static void mixin(object $mixin, bool $replace = true) |
70
|
|
|
* @method static bool move(string $from, string $to) |
71
|
|
|
* @method static \BlitzPHP\Filesystem\FilesystemAdapter|mixed when((Closure | mixed | null) $value = null, (callable | null) $callback = null, (callable | null) $default = null) |
72
|
|
|
* @method static string path(string $path) |
73
|
|
|
* @method static bool prepend(string $path, string $data) |
74
|
|
|
* @method static bool providesTemporaryUrls() |
75
|
|
|
* @method static void purge(string|null $name = null) |
76
|
|
|
* @method static bool put(string $path, resource|string $contents, mixed $options = []) |
77
|
|
|
* @method static string|false putFile(string $path, \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string $file, mixed $options = []) |
78
|
|
|
* @method static string|false putFileAs(string $path, \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string $file, string $name, mixed $options = []) |
79
|
|
|
* @method static string read(string $location) |
80
|
|
|
* @method static resource|null readStream(string $path) |
81
|
|
|
* @method static \Symfony\Component\HttpFoundation\StreamedResponse response(string $path, string|null $name = null, array $headers = [], string|null $disposition = 'inline') |
82
|
|
|
* @method static FilesystemManager set(string $name, mixed $disk) |
83
|
|
|
* @method static FilesystemManager setApplication(\Illuminate\Contracts\Foundation\Application $app) |
84
|
|
|
* @method static bool setVisibility(string $path, string $visibility) |
85
|
|
|
* @method static int size(string $path) |
86
|
|
|
* @method static string temporaryUrl(string $path, DateTimeInterface $expiration, array $options = []) |
87
|
|
|
* @method static string url(string $path) |
88
|
|
|
* @method static string visibility(string $path) |
89
|
|
|
* @method static void write(string $location, string $contents, array $config = []) |
90
|
|
|
* @method static bool writeStream(string $path, resource $resource, array $options = []) |
91
|
|
|
* |
92
|
|
|
* @see FilesystemManager |
93
|
|
|
*/ |
|
|
|
|
94
|
|
|
final class Storage extends Facade |
95
|
|
|
{ |
96
|
|
|
protected static function accessor(): object |
97
|
|
|
{ |
98
|
2 |
|
return Services::storage(); |
99
|
|
|
} |
100
|
|
|
} |
101
|
|
|
|