filecreate-0.0.7
توضیحات
Provides functionality for creating a new empty file with unique name
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | filecreate-0.0.7 |
| نام | filecreate |
| نسخه کتابخانه | 0.0.7 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Egor Wexler |
| ایمیل نویسنده | egor.wexler@icloud.com |
| آدرس صفحه اصلی | https://github.com/LuckyKarter/filecreate |
| آدرس اینترنتی | https://pypi.org/project/filecreate/ |
| مجوز | - |
# FileCreate
[](https://pypi.org/project/filecreate/)
Provides functionality for creating a new empty file with unique name.
The file_mask parameter may contain a sequence of hash marks '#' which will be substituted by a unique sequence number
starting from 001.
## Install:
```bash
$ pip install filecreate
```
## Usage Samples:
```Python
from filecreate import FileCreate
# Create file using mask
# by default parameter leading_zeros=True and all hash signs are replaced with numbers
with FileCreate('test####.txt') as file: # if test0001.txt does not exist - creates it
file.writelines() # working with file descriptor as usual
with FileCreate('test####.txt', leading_zeros=False): # will create file test1.txt
file.writelines()
# if file cannot be created (maximum sequence reached) - FileExistsError exception is raised
# Get available file name without creating an actual file
filename = FileCreate.get_filename('Folder', 'test###.txt')
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl filecreate-0.0.7:
pip install filecreate-0.0.7.whl
نصب پکیج tar.gz filecreate-0.0.7:
pip install filecreate-0.0.7.tar.gz