File extends
Project description
FileExtension
Stworzenie pełnej ścieżki
from fileextend import mkdir_full
mkdir_full('a/b/c/d/e')
Pobranie liczby znaków z pliku
Umożliwia także wyliczanie liczby znaków dla dużyc plików za pomocą chunków
Drugi parametr określa rozmar chunka w MB, domyślnie 5MB
from fileextend import file_get_length
print(file_get_length('/file/path.txt', 50))
Wyliczenia hash sha256 dla pliku
Drugi parametr określa rozmar chunka w MB, domyślnie 5MB
from fileextend import file_get_sha256
print(file_get_sha256('/file/path.txt'))
Tworzenie pliku
from fileextend import touch
touch('/path/to/file', 'content')
Has json content
from fileextend import has_json_content
print(has_json_content('/path/to/file'))
Operowanie na pliku
from fileextend.file import File
file = File('test.txt') # open file
file.set_type('string') # content ype (string/byte), default string
file.set_encoding('utf-8') # content encoding, default utf-8
file.touch('content') # create file (if not exists)
file.append('content') # append to file
print(file.get_length()) # get content length
print(file.get_hash_sha256()) # get sha256 hash
Tar
Is valid tar file
from fileextend.tar import is_valid_tar
print(is_valid_tar('/path/to/file.tar'))
Extract tar file
from fileextend.tar import extract_tar_file
print(extract_tar_file('/tar/path', '/tar/file'))
List files from tar
from fileextend.tar import list_files_from_tar
print(list_files_from_tar('/path/to/file.tar'))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fileextend-0.2.tar.gz
(4.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fileextend-0.2.tar.gz.
File metadata
- Download URL: fileextend-0.2.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbb727b80c3ec83657288b94217b61110ea405100d5043a8c0a399daa4d800fa
|
|
| MD5 |
fa6156f76d33c4438961ff50c045ac58
|
|
| BLAKE2b-256 |
eb73cf03fbcdb50a2138072aa9896721311ba66316a61b544d6b6900115a0cdd
|
File details
Details for the file fileextend-0.2-py3-none-any.whl.
File metadata
- Download URL: fileextend-0.2-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf8e1985560111afd13ee7b7e94180785b8ab910b3fb4bbb1b44dc66d43a7ed2
|
|
| MD5 |
2d283197c30c47033a3acf7cd1112f63
|
|
| BLAKE2b-256 |
8f1ddd9736d517f8521b2b4a5093a70958c2a301a516e21d88ebe4c0be0765b8
|