MemoryResourceProvider class Null safety

An in-memory implementation of ResourceProvider. Use / as a path separator.

Implemented types


MemoryResourceProvider({Context? context, @deprecated bool isWindows = false})


hashCode int
The hash code for this object. [...]
read-only, inherited
nextStamp int
read / write
pathContext Context
Get the path context used by this resource provider.
read-only, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


convertPath(String path) String
Convert the given posix path to conform to this provider's path context. [...]
deleteFile(String path) → void
Delete the file with the given path.
deleteFolder(String path) → void
Delete the folder with the given path and recursively delete nested files and folders.
getFile(String path) File
Return a File that corresponds to the given path. [...]
getFolder(String path) Folder
Return a Folder that corresponds to the given path. [...]
getModificationTimes(List<Source> sources) Future<List<int>>
Complete with a list of modification times for the given sources. [...]
getResource(String path) Resource
Return the Resource that corresponds to the given path. [...]
getStateLocation(String pluginId) Folder
Return the folder in which the plugin with the given pluginId can store state that will persist across sessions. The folder returned for a given id will not be returned for a different id, ensuring that plugins do not need to be concerned with file name collisions with other plugins, assuming that the plugin ids are unique. The plugin ids must be valid folder names.
modifyFile(String path, String content) → void
Create a resource representing a dummy link (that is, a File object which appears in its parent directory, but whose exists property is false)
newFile(String path, String content, [int? stamp]) File
newFileWithBytes(String path, List<int> bytes, [int? stamp]) File
newFolder(String path) Folder
Create a link from the path to the target.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
A string representation of this object. [...]
updateFile(String path, String content, [int? stamp]) File
writeOn(StringSink sink) → void
Write a representation of the file system on the given sink.


operator ==(Object other) bool
The equality operator. [...]