Skip to content

7span/get-any-temp-file-dart

Repository files navigation

Pub Version Dart Version

Dart package to generate temporary file with any extension or file type in local directory of the device.

Features

getanytempfile.dart is a Dart package that provides a simple and efficient way to create temporary files of any extension in a temporary directory.

Installation

Add the following dependency to your pubspec.yaml:

dependencies:getAnyTempFile: ^
1.0
.0

Then run: $ dart pub get

Usage

void main() {
  var getAnyTempFile = GetAnyTempFile();

  ///Generate .png temp file
  print('getAnyTempFile: ${getAnyTempFile.getAnyTempFile(
      prefixName: 'mytemp', fileName: 'getMyTemp')}');

  ///Generate .jpeg temp file
  print('getAnyTempFile: ${getAnyTempFile.getAnyTempFile(
      prefixName: 'mytemp', fileName: 'getMyTemp', fileType: 'jpeg')}');

  ///Generate .mp4 temp file
  print('getAnyTempFile: ${getAnyTempFile.getAnyTempFile(
      prefixName: 'mytemp', fileName: 'getMyTemp', fileType: 'mp4')}');

  ///Generate .mp3 temp file
  print('getAnyTempFile: ${getAnyTempFile.getAnyTempFile(
      prefixName: 'mytemp', fileName: 'getMyTemp', fileType: 'mp3')}');
}

Additional information

getAnyTempFile() method returns a File object that represents the created temporary file. You can specify the extension of the file by providing the extension argument. If not specified, the default extension is .png.

Contributors

Mukund Jogi twitter_logo linkedin_logo

Having Issues

File the Issue here

Looking to contribute to this package:

🤘🏻 Then it's Great! Fork the Repo Update Code, write a meaningful commit message. Send a PR. That's all you need to contribute.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages