FileUtils class

Filesystem helpers with path traversal protection.

Constructors

FileUtils()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createDirectoryIfMissing(String directoryPath) bool
Creates directoryPath recursively if it does not exist.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveSafePath({required String projectRootPath, required String relativePath}) String
Resolves relativePath against projectRootPath and enforces root bounds.
toString() String
A string representation of this object.
inherited
writeFileIfMissing({required String filePath, required String contents}) bool
Writes contents to filePath only when the file does not exist.

Operators

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