FLUTTER ECOSYSTEM

thitlwincoder/name_plus

自動遞增檔案與目錄名稱並建立

name_plus 專案封面
Stars
1
Forks
1
最近推送(UTC)
2023年7月17日
專案狀態
未封存
Thit Lwin GitHub avatar
GITHUB User

Thit Lwin ↗

Flutter Developer

RemoteYangon, Myanmar(Burma)
語言Dart

技術主題

此儲存庫發佈的套件

使用的依賴

依賴清單 2 項

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

Name Plus

pub package Last Commits GitHub repo size License
Uploaded By

Automatically increment File & Directory name and create.

Usage

create File with extension

File('path').namePlus('filename');

File('path').namePlusSync('filename');

create Directory with extension

Directory('path').namePlus('filename');

Directory('path').namePlusSync('filename');

Options

When creating a File or Directory, you can pass some options:

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

File('example').namePlus('test.txt');
// test 1.txt

If you use format option, d is number place.

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 if you find a problem or make pull requests.

All contributions are welcome :)