tmp_path 1.3.3 copy "tmp_path: ^1.3.3" to clipboard
tmp_path: ^1.3.3 copied to clipboard

Generate a unique path in system temp directory.

tmp_path #

pub package Build Status

Generate a unique path in system temp directory. You can use it to create a temporary file or directory.

Usage #

import 'package:tmp_path/src/tmp_path.dart';

void main() {
  print(tmpPath());
  // /var/folders/q5/yvcxrtbn7mq5h4r4zvjhp_v40000gn/T/e8d9cbbcc1944c32a68d3d3739618dcb1679847188986

  print(tmpPath(prefix: 'test'));
  // /var/folders/q5/yvcxrtbn7mq5h4r4zvjhp_v40000gn/T/test399b42ececa84e069cf582b0adf1cea61679847188991

  print(tmpPath(parentDirectory: '/a/b/c'));
  // /a/b/c/30937c061c944d059dfc298242ef1e211679847188991

  print(tmpFileName() + '.txt');
  // 30937c061c944d059dfc298242ef1e211679847188991.txt
}
2
likes
150
points
836
downloads

Publisher

verified publisherflutter-cavalry.com

Weekly Downloads

Generate a unique path in system temp directory.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

path, uuid

More

Packages that depend on tmp_path