IOUtil class

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

copyDirectoryToAsync(String path, String pathTarget, {String? rootPath, bool showLog = true}) Future<void>
目录拷贝
copyDirectoryToSync(String path, String pathTarget, {String? rootPath, bool showLog = true}) → void
目录拷贝
copyFileToAsync(String path, String pathTarget, {bool showLog = true, bool targetIsDirectory = false}) Future<void>
文件拷贝
copyFileToSync(String path, String pathTarget, {bool showLog = true, bool targetIsDirectory = false}) → void
文件拷贝
existsAsync(String uri, {bool isDir = false}) Future<bool>
判断目录、文件是否存在
existsSync(String uri, {bool isDir = false}) bool
判断目录、文件是否存在
isDirectoryAsync(String uri) Future<bool>
判断指定路径否为目录
isDirectorySync(String uri) bool
判断指定路径否为目录
isFileAsync(String uri) Future<bool>
判断指定路径否为文件
isFileSync(String uri) bool
判断指定路径否为文件
isLinKAsync(String uri) Future<bool>
判断指定路径否为引用
isLinkSync(String uri) bool
判断指定路径否为引用
mkdirAsync(String path, {bool showLog = true}) Future<Directory>
创建文件夹
mkdirSync(String path, {bool showLog = true}) → void
创建文件夹
readAsBytes(String path) Future<Uint8List>
读取文件 - 以字节流的形式
readAsBytesSync(String path) Uint8List
读取文件 - 以字节流的形式
readAsStringAsync(String path) Future<String>
读取文字文件
readAsStringSync(String path) String
读取文字文件
readJsonAsync(String path) Future<Object?>?
读取JSON文件信息
readJsonSync(String path) Object?
读取JSON文件信息
removeDirectoryAsync(String path) Future<void>
创建文件夹
removeDirectorySync(String path) → void
创建文件夹
removeFilesSync(String path, {Pattern? pattern}) → void
根据指定条件删除文件
renameAsync(String oldPath, String newPath) Future<void>
Renames the file from oldPath to newPath. Allow path type of FileDirectoryLink.
renameSync(String oldPath, String newPath) → void
Renames the file from oldPath to newPath. Allow path type of FileDirectoryLink.
typeAsync(String uri) Future<FileSystemEntityType>
同步返回指定路径类型
typeSync(String uri) FileSystemEntityType
同步返回指定路径类型
writeAsStringAsync(String path, String content) Future<File>
写入文本文件
writeAsStringSync(String path, String content) → void
写入文本文件
writeAsync(String path, List<int> bytes) Future<File>
写入文件
writeJsonAsync(String path, Map<String, dynamic> json) Future<File>
写入Json文件
writeJsonSync(String path, Map<String, dynamic> json) → void
写入Json文件
writeSync(String path, List<int> bytes) → void
写入文件