name_plus 0.0.3 copy "name_plus: ^0.0.3" to clipboard
name_plus: ^0.0.3 copied to clipboard

Automatically increment File & Directory name and create.

example/name_plus_example.dart

import 'dart:io';

import 'package:name_plus/name_plus.dart';

void main() {
  /// File

  /// without sync
  File(Directory.current.path).namePlus('test.txt');
  // test 1.txt

  File(Directory.current.path).namePlus('test.txt', format: '(d)');
  // test (1).txt

  File(Directory.current.path).namePlus('test.txt', space: false);
  // test1.txt

  /// with sync
  File(Directory.current.path).namePlusSync('test.txt');
  // test 1.txt

  /// Directory

  /// without sync
  Directory(Directory.current.path).namePlus('test');
  // test 1

  Directory(Directory.current.path).namePlus('test', format: '(d)');
  // test (1)

  Directory(Directory.current.path).namePlus('test', space: false);
  // test1

  /// with sync
  Directory(Directory.current.path).namePlusSync('test');
  // test 1
}
3
likes
130
points
86
downloads

Publisher

unverified uploader

Weekly Downloads

Automatically increment File & Directory name and create.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

path

More

Packages that depend on name_plus