PPath class
路径工具类 提供一些常用的路径操作方法
Constructors
- PPath()
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
-
appCacheDir(
) → Future< Directory> - 获取应用缓存目录
-
appDocumentDir(
) → Future< Directory> - 获取应用文档目录
-
appDownloadDir(
) → Future< Directory?> - 获取下载目录(Android不支持)
-
appSupportDir(
) → Future< Directory> - 获取应用支持目录
-
appTempDir(
) → Future< Directory> - 获取临时目录
-
buildFilePathInCache(
String pathFile) → Future< String> - 构建Caches文件路径
-
buildFilePathInDoc(
String pathFile) → Future< String> - 构建Documents文件路径
-
buildPathInCache(
{String subPath = '', String fileName = ''}) → Future< String> - 构建Caches下的路径
-
buildPathInDoc(
{String subPath = '', String fileName = ''}) → Future< String> - 构建Documents下的路径
-
clearTempDir(
) → Future< void> - 清理临时目录中的所有文件和子目录
-
createDir(
String path) → Future< Directory> - 根据路径创建一个目录
-
createDirInCache(
String dirName) → Future< Directory> - 在应用缓存目录下创建一个子目录
-
createDirInDoc(
String dirName) → Future< Directory> - 在应用文档目录下创建一个子目录
-
createDirInTemp(
String dirName) → Future< Directory> - 在应用临时目录下创建一个子目录
-
dirname(
String path) → String - 获取路径的上级目录名
-
extStorageCacheDirs(
) → Future< List< Directory> ?> - 获取外部存储缓存目录(仅支持Android)
-
extStorageDir(
) → Future< Directory?> - 获取外部存储目录(仅支持Android)
-
fileExt(
String path) → String - 获取文件的扩展名(.ext)
-
filename(
String path) → String - 获取路径最后的文件名(含扩展名)
-
filenameWithoutExt(
String path) → String - 获取不带扩展名的文件名
-
join(
String path, String name) → String - 在一个目录下追加一个目录或文件名