CFile class
表示一个文件或目录的类。
Properties
- filename ↔ String
-
文件或目录的路径。
getter/setter pair
-
files
→ List<
CFile> -
获取目录下的所有文件和子目录。
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDirectory → bool
-
检查当前路径是否为目录。
no setter
- isExist → bool
-
检查文件或目录是否存在。
no setter
- isFile → bool
-
检查当前路径是否为文件。
no setter
-
lines
→ List<
String> -
读取文件的所有行。
no setter
- parent → CFile
-
获取当前文件或目录的父目录。
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyTo(
String dest) → void - 将当前文件复制到指定路径。
-
createFile(
) → void - 创建一个空文件。
-
createPath(
) → void - 创建一个目录。
-
createSubFile(
String subname) → void - 在当前目录下创建一个子文件。
-
createSubPath(
String subname) → void - 在当前目录下创建一个子目录。
-
moveTo(
String dest) → void - 将当前文件或目录移动到指定路径。
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
) → void - 删除当前文件或目录。
-
removeSub(
String subname) → void - 删除当前目录下的指定子文件。
-
slibing(
String name) → CFile - 获取当前目录下的指定同级文件或目录。
-
subFile(
String subname) → CFile - 获取当前目录下的指定子文件。
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited