Skip to content

Repository files navigation

app_tmp_path

pub package

  • Create a unique file path or directory in app temporary directory.
  • Clear all contents in app temporary directory.

Usage

import'package:app_tmp_path/app_tmp_path.dart';
voidmain() async {
// Create a unique directory in app temporary directory.print(awaitcreateAppTmpDir());
// Create a unique file in app temporary directory.// The parent directory will be created automatically if it does not exist.print(awaitcreateAppTmpFile());
// You can also specify a custom file name.// In that case, a unique parent directory will be created automatically.print(awaitcreateAppTmpFile(fileName:'my_file.txt'));
// If you want to generate a unique file name, you can use tmpFileName() function.print(tmpFileName() +'.txt');
// 30937c061c944d059dfc298242ef1e211679847188991.txt// You can also clean the app's temporary directory.awaitcleanAppTmpRootDir();
}

About

Generate a unique path in app temporary directory.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages