https://github.com/thitlwincoder/name_plus
Automatically increment File & Directory name and create
https://github.com/thitlwincoder/name_plus
dart file flutter folder name plus
Last synced: 2 months ago
JSON representation
Automatically increment File & Directory name and create
- Host: GitHub
- URL: https://github.com/thitlwincoder/name_plus
- Owner: thitlwincoder
- License: mit
- Created: 2021-12-12T15:13:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-07-17T03:12:26.000Z (almost 3 years ago)
- Last Synced: 2025-10-23T02:16:47.990Z (6 months ago)
- Topics: dart, file, flutter, folder, name, plus
- Language: Dart
- Homepage: https://pub.dev/packages/name_plus
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Name Plus
[](https://pub.dev/packages/name_plus)
[](https://github.com/thitlwincoder/name_plus/commits/master)
[](https://github.com/thitlwincoder/name_plus)
[](https://github.com/thitlwincoder/name_plus/blob/master/LICENSE)
[](https://github.com/thitlwincoder)
Automatically increment `File` & `Directory` name and create.
## Usage
create `File` with extension
```dart
File('path').namePlus('filename');
File('path').namePlusSync('filename');
```
create `Directory` with extension
```dart
Directory('path').namePlus('filename');
Directory('path').namePlusSync('filename');
```
## Options
When creating a `File` or `Directory`, you can pass some options:
```dart
File('path').namePlus(
'filename',
format: '(d)', // change increment number format
space: false, // space between name & number format
);
```
## Documentation
Check `test.txt` file name from `example` folder path and then name not exist create `test.txt` or name is already exist create with default format `test 1.txt`
```dart
File('example').namePlus('test.txt');
// test 1.txt
```
If you use `format` option, `d` is number place.
```dart
File('example').namePlus('test.txt', format: '(d)');
// test (2).txt
File('example').namePlus('test.txt', format: '{d}');
// test {3}.txt
```
## Contribution
Feel free to file an [issue](https://github.com/thitlwincoder/name_plus/issues/new) if you find a problem or make pull requests.
All contributions are welcome :)