CanWorkWithFile mixin

Mixin Applications

Properties

basename String
The part of path after the last separator.
no setter
basenameWithoutExtension String
The part of path after the last separator, and without trailing file extension.
no setter
exceptionWhenFileNotExists bool
If true returns null when a requested file not found.
no setter
hashCode int
The hash code for this object.
no setterinherited
npath String
Normalized path. See PathStringExt.npath.
no setter
path String
Path with a system separator. See spathSeparator.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copy(dynamic from, dynamic to) WFile
Returns a link to copied file.
counstructPath({bool? hasFile}) → void
delete([dynamic pathToFile]) → void
existsAny([dynamic path]) bool
Exists a file or directory. path can be String or Iterable<String>.
existsDir([dynamic pathToDir]) bool
existsFile([dynamic pathToFile]) bool
join(dynamic anyPath, [bool withPrefix = true]) String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readAsBytes([dynamic pathToFile]) Uint8List?
readAsImage(dynamic pathToFile, {int? numChannels, num? alpha}) → Image?
Read image and can get a guarantee an alpha channel. If the numChannels is 4 and the current image does not have an alpha channel, then the given alpha value will be used to set the new alpha channel. If alpha is not provided, then the maxChannelValue will be used to set the alpha.
readAsJsonList([dynamic pathToFile]) → JsonList?
See readAsJsonListT.
readAsJsonListListT<T>([dynamic pathToFile]) List<List<T>>?
See readAsJsonListT.
readAsJsonListString([dynamic pathToFile]) List<String>?
See readAsJsonListT.
readAsJsonListT<T>([dynamic pathToFile]) List<T>?
See readAsJsonListListT.
readAsJsonMap([dynamic pathToFile]) → JsonMap?
See readAsJsonMapT.
readAsJsonMapString([dynamic pathToFile]) Map<String, String>?
See readAsJsonMapT.
readAsJsonMapT<T>([dynamic pathToFile]) Map<String, T>?
readAsText([dynamic pathToFile, Encoding encoding = utf8]) String?
readAsTextLines([dynamic pathToFile, Encoding encoding = utf8]) List<String>?
readAsXml([dynamic pathToFile]) → XmlDocument?
readOrDefaults<T>(dynamic pathToFile, T reader(File), {T? defaults}) → T?
toString() String
A string representation of this object.
inherited
writeAsBytes(Uint8List bytes, [dynamic pathToFile]) → void
writeAsImage(Image image, [dynamic pathToFile]) → void
writeAsText(String text, [dynamic pathToFile]) → void
writeAsXml(XmlDocument xml, [dynamic pathToFile, bool pretty = false]) → void

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

counstructPathToFile(String pathToFile, {bool asFolder = false}) → void
When asFolder is true, pathToFile was a path to folder.