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'))
Metadata
Release files for fileextend 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fileextend-0.2.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fileextend-0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.3 kB
Release files / fileextend-0.2.tar.gz
| Download URL | fileextend-0.2.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cbb727b80c3ec83657288b94217b61110ea405100d5043a8c0a399daa4d800fa
|
|
BLAKE2b-256 checksum How to use checksums |
eb73cf03fbcdb50a2138072aa9896721311ba66316a61b544d6b6900115a0cdd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|
Release files / fileextend-0.2-py3-none-any.whl
| Download URL | fileextend-0.2-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf8e1985560111afd13ee7b7e94180785b8ab910b3fb4bbb1b44dc66d43a7ed2
|
|
BLAKE2b-256 checksum How to use checksums |
8f1ddd9736d517f8521b2b4a5093a70958c2a301a516e21d88ebe4c0be0765b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|