Files are leaf Resources which contain data.
Methods
-
copyTo(Folder parentFolder)
→ File
-
Copy this resource to a child of the
parentFolder
with the same kind and
shortName as this resource. If this resource is a folder, then all of
the contents of the folder will be recursively copied.
override
-
delete()
→ void
-
Synchronously deletes this resource and its children.
inherited
-
isOrContains(String path)
→ bool
-
Return
true
if absolute path
references this resource or a resource in
this folder.
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
readAsBytesSync()
→ Uint8List
-
Synchronously read the entire file contents as a list of bytes.
Throws a FileSystemException if the operation fails.
-
readAsStringSync()
→ String
-
Synchronously read the entire file contents as a String.
Throws FileSystemException if the file does not exist.
-
renameSync(String newPath)
→ File
-
Synchronously rename this file.
Return a File instance for the renamed file.
-
resolveSymbolicLinksSync()
→ Resource
-
Return a resource that refers to the same resource as this resource, but
whose path does not contain any symbolic links.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
toUri()
→ Uri
-
Return a Uri representing this resource.
inherited
-
watch()
→ ResourceWatcher
-
Watch for changes to this file.
override
-
writeAsBytesSync(List<int> bytes)
→ void
-
Synchronously write the given
bytes
to the file. The new content will
replace any existing content.
-
writeAsStringSync(String content)
→ void
-
Synchronously write the given
content
to the file. The new content will
replace any existing content.