xxf_files library
文件相关
Classes
- FileSaveLocation
- The response from a save dialog.
- XFile
- A CrossFile is a cross-platform, simplified File abstraction.
- XTypeGroup
- A set of allowed XTypes.
Enums
- StorageDirectory
-
Corresponds to constants defined in Androids
android.os.Environment
class.
Extensions
- FileSystemEntityPathExtension on T
- 泛型扩展 FileSystemEntity(支持 File、Directory、Link)
Properties
- disablePathProviderPlatformOverride ← bool
-
no getter
Functions
-
getApplicationCacheDirectory(
) → Future< Directory> - Path to a directory where the application may place application-specific cache files.
-
getApplicationDocumentsDirectory(
) → Future< Directory> - Path to a directory where the application may place data that is user-generated, or that cannot otherwise be recreated by your application.
-
getApplicationSupportDirectory(
) → Future< Directory> - Path to a directory where the application may place application support files.
-
getDirectoryPath(
{String? initialDirectory, String? confirmButtonText}) → Future< String?> - Opens a directory selection dialog and returns the path chosen by the user.
-
getDirectoryPaths(
{String? initialDirectory, String? confirmButtonText}) → Future< List< String?> > - Opens a directory selection dialog and returns a list of the paths chosen by the user.
-
getDownloadsDirectory(
) → Future< Directory?> - Path to the directory where downloaded files can be stored.
-
getExternalCacheDirectories(
) → Future< List< Directory> ?> - Paths to directories where application specific cache data can be stored externally.
-
getExternalStorageDirectories(
{StorageDirectory? type}) → Future< List< Directory> ?> - Paths to directories where application specific data can be stored externally.
-
getExternalStorageDirectory(
) → Future< Directory?> - Path to a directory where the application may access top level storage.
-
getLibraryDirectory(
) → Future< Directory> - Path to the directory where application can store files that are persistent, backed up, and not visible to the user, such as sqlite.db.
-
getSaveLocation(
{List< XTypeGroup> acceptedTypeGroups = const <XTypeGroup>[], String? initialDirectory, String? suggestedName, String? confirmButtonText}) → Future<FileSaveLocation?> - Opens a save dialog and returns the target path chosen by the user.
-
getTemporaryDirectory(
) → Future< Directory> - Path to the temporary directory on the device that is not backed up and is suitable for storing caches of downloaded files.
-
openFile(
{List< XTypeGroup> acceptedTypeGroups = const <XTypeGroup>[], String? initialDirectory, String? confirmButtonText}) → Future<XFile?> - Opens a file selection dialog and returns the path chosen by the user.
-
openFiles(
{List< XTypeGroup> acceptedTypeGroups = const <XTypeGroup>[], String? initialDirectory, String? confirmButtonText}) → Future<List< XFile> > - Opens a file selection dialog and returns the list of paths chosen by the user.
Exceptions / Errors
- MissingPlatformDirectoryException
- An exception thrown when a directory that should always be available on the current platform cannot be obtained.