File.php 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. namespace Illuminate\Support\Facades;
  3. /**
  4. * @method static bool exists(string $path)
  5. * @method static bool missing(string $path)
  6. * @method static string get(string $path, bool $lock = false)
  7. * @method static array json(string $path, int $flags = 0, bool $lock = false)
  8. * @method static string sharedGet(string $path)
  9. * @method static mixed getRequire(string $path, array $data = [])
  10. * @method static mixed requireOnce(string $path, array $data = [])
  11. * @method static \Illuminate\Support\LazyCollection lines(string $path)
  12. * @method static string|false hash(string $path, string $algorithm = 'md5')
  13. * @method static int|bool put(string $path, string $contents, bool $lock = false)
  14. * @method static void replace(string $path, string $content, int|null $mode = null)
  15. * @method static void replaceInFile(array|string $search, array|string $replace, string $path)
  16. * @method static int prepend(string $path, string $data)
  17. * @method static int append(string $path, string $data, bool $lock = false)
  18. * @method static mixed chmod(string $path, int|null $mode = null)
  19. * @method static bool delete(string|array $paths)
  20. * @method static bool move(string $path, string $target)
  21. * @method static bool copy(string $path, string $target)
  22. * @method static bool|null link(string $target, string $link)
  23. * @method static void relativeLink(string $target, string $link)
  24. * @method static string name(string $path)
  25. * @method static string basename(string $path)
  26. * @method static string dirname(string $path)
  27. * @method static string extension(string $path)
  28. * @method static string|null guessExtension(string $path)
  29. * @method static string type(string $path)
  30. * @method static string|false mimeType(string $path)
  31. * @method static int size(string $path)
  32. * @method static int lastModified(string $path)
  33. * @method static bool isDirectory(string $directory)
  34. * @method static bool isEmptyDirectory(string $directory, bool $ignoreDotFiles = false)
  35. * @method static bool isReadable(string $path)
  36. * @method static bool isWritable(string $path)
  37. * @method static bool hasSameHash(string $firstFile, string $secondFile)
  38. * @method static bool isFile(string $file)
  39. * @method static array glob(string $pattern, int $flags = 0)
  40. * @method static \Symfony\Component\Finder\SplFileInfo[] files(string $directory, bool $hidden = false, array|string|int $depth = 0)
  41. * @method static \Symfony\Component\Finder\SplFileInfo[] allFiles(string $directory, bool $hidden = false)
  42. * @method static array directories(string $directory, array|string|int $depth = 0)
  43. * @method static array allDirectories(string $directory)
  44. * @method static void ensureDirectoryExists(string $path, int $mode = 0755, bool $recursive = true)
  45. * @method static bool makeDirectory(string $path, int $mode = 0755, bool $recursive = false, bool $force = false)
  46. * @method static bool moveDirectory(string $from, string $to, bool $overwrite = false)
  47. * @method static bool copyDirectory(string $directory, string $destination, int|null $options = null)
  48. * @method static bool deleteDirectory(string $directory, bool $preserve = false)
  49. * @method static bool deleteDirectories(string $directory)
  50. * @method static bool cleanDirectory(string $directory)
  51. * @method static \Illuminate\Filesystem\Filesystem|mixed when(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  52. * @method static \Illuminate\Filesystem\Filesystem|mixed unless(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  53. * @method static void macro(string $name, object|callable $macro)
  54. * @method static void mixin(object $mixin, bool $replace = true)
  55. * @method static bool hasMacro(string $name)
  56. * @method static void flushMacros()
  57. *
  58. * @see \Illuminate\Filesystem\Filesystem
  59. */
  60. class File extends Facade
  61. {
  62. /**
  63. * Get the registered name of the component.
  64. *
  65. * @return string
  66. */
  67. protected static function getFacadeAccessor()
  68. {
  69. return 'files';
  70. }
  71. }