getTemporaryDirectory static method

Future<Directory> getTemporaryDirectory()

Path to the temporary directory on the device that is not backed up and is suitable for storing caches of downloaded files.

Files in this directory may be cleared at any time. This does not return a new temporary directory. Instead, the caller is responsible for creating (and cleaning up) files or directories within this directory. This directory is scoped to the calling application.

On iOS, this uses the NSCachesDirectory API.

On Android, this uses the getCacheDir API on the context.

Throws a MissingPlatformDirectoryException if the system is unable to provide the directory.

Implementation

static Future<Directory> getTemporaryDirectory() =>
    PspdfkitFlutterPlatform.instance.getTemporaryDirectory();