A filesystem abstraction (Laravel Filesystem; BLUEPRINT_V2 §7.10.1).
Paths are relative, /-separated and never escape the disk root.
- Implementers
- Available extensions
Properties
Methods
-
allFiles(
[String directory = '']) → Future< List< String> > -
Every file under
directory, recursively. -
append(
String path, String contents) → Future< void> - Appends a line (adds a newline when the file is not empty).
-
copy(
String from, String to) → Future< void> -
Copies
fromtoto. -
delete(
Object paths) → Future< bool> -
Deletes files; returns
truewhen every one existed. -
deleteDirectory(
String path) → Future< bool> -
Deletes the directory
pathand its contents. -
directories(
[String directory = '', bool recursive = false]) → Future< List< String> > - The directories directly in a directory.
-
download(
String path, {String? name, Map< String, String> ? headers, Request? request}) → Future<Response> -
Available on Disk, provided by the DiskResponses extension
The file atpathas an attachment. -
exists(
String path) → Future< bool> -
Whether
pathexists. -
files(
[String directory = '', bool recursive = false]) → Future< List< String> > -
Files directly inside
directory(or recursively). -
get(
String path) → Future< String> -
The text at
path. -
getBytes(
String path) → Future< Uint8List> -
The bytes at
path. -
lastModified(
String path) → Future< DateTime> -
When
pathwas last changed. -
makeDirectory(
String path) → Future< void> -
Creates the directory
path. -
missing(
String path) → Future< bool> -
Whether
pathdoes not exist. -
move(
String from, String to) → Future< void> -
Moves
fromtoto. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
put(
String path, Object contents) → Future< void> -
Writes
contents(Stringas UTF-8 orList<int>). -
putStream(
String path, Stream< List< stream) → Future<int> >void> -
Writes
streamtopathwithout holding it in memory. -
readStream(
String path) → Stream< List< int> > -
The bytes at
path, streamed. -
response(
String path, {String? name, Map< String, String> ? headers, Request? request}) → Future<Response> -
Available on Disk, provided by the DiskResponses extension
The file atpath, shown by the browser; withrequest, ranges too. -
size(
String path) → Future< int> -
The size of
pathin bytes. -
toString(
) → String -
A string representation of this object.
inherited
-
url(
String path) → String -
Public URL (only for disks with a
url).
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited