Skip to main content

Some useful functions for files/folders

# Tested with:
# Python 3.9.13
# Windows 10

pip install file-folder-tools


from file_folder_tools import *

maximize_console(lines=None)


rm_dir(path=r"F:\testdele - Copy", dryrun=True)

safeprint("oioi")

path = r"F:\bat.png"
set_file_read_only(path)
set_file_writeable(path)

stat_S_ENFMT_Record_locking_enforced(path)

stat_S_IEXEC_Execute_by_owner(path)

stat_S_IREAD_Read_by_owner(path)

stat_S_IRGRP_Read_by_group(path)

stat_S_IROTH_Read_by_others(path)

stat_S_IRUSR_Read_by_owner(path)

stat_S_IRWXG_Read_write_and_execute_by_group(path)

stat_S_IRWXO_Read_write_and_execute_by_others(path)

stat_S_IRWXU_Read_write_and_execute_by_owner(path)

stat_S_ISGID_Set_group_ID_on_execution(path)

stat_S_ISUID_Set_user_ID_on_execution(path)

stat_S_ISVTX_Save_text_image_after_execution(path)

stat_S_IWGRP_Write_by_group(path)

stat_S_IWOTH_Write_by_others(path)

stat_S_IWRITE_Write_by_owner(path)

stat_S_IWUSR_Write_by_owner(path)

stat_S_IXGRP_Execute_by_group(path)

stat_S_IXOTH_Execute_by_others(path)

stat_S_IXUSR_Execute_by_owner(path)

tempfolder_string, function_to_remove = tempfolder()

functions_to_remove, files, tempfolder_string_ = tempfolder_and_files(
    fileprefix="tmp_", numberoffiles=10, suffix=".bin", zfill=8
)

update_edit_time_of_file(path)

what_is_it(path)
pklo = read_pkl(filename=r"F:\gutelautschrift.pkl")
write_pkl(object_=pklo, savepath=r"F:\gutelautschrift2.pkl")

concat_files(
    filenames=[r"F:\gutelautschrift.pkl", r"F:\gutelautschrift2.pkl"],
    output="f:\\concatfiles.pkl",
)

create_folder_if_not_there(folder="f:\\testen")

create_spooledtempfile_with_content(content=b"xxxxxx")

decode_filepath(path)

enableLUA_disableLUA(enable=False)

encode_filepath(path)

generate_ssh_key(file_path="f:\\sshtestkey", public_exponent=65537, key_size=2048)

get_absolute_path_from_file(path)

get_file_hash(filepath="appl.py")

get_filesize(path)

get_hash_from_variable(variable="baba")

filestring, removefunction = get_tmpfile(suffix=".bin")

is_file_being_used(path)

is_file_read_only(r"F:\bat.png")

Metadata

Release files for file-folder-tools 0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for file-folder-tools 0.10
File Size Uploaded Provenance Actions
file_folder_tools-0.10.tar.gz 6.9 kB Without provenance Details for file_folder_tools-0.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for file-folder-tools 0.10
File Interpreter ABI Platform Actions
file_folder_tools-0.10-py3-none-any.whl Python 3 none any Details for file_folder_tools-0.10-py3-none-any.whl

Total release size: 15.3 kB

Release files / file_folder_tools-0.10.tar.gz

Download URL file_folder_tools-0.10.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
672acf0131ef0ed0171cf646b8bf7acedae517d77e3d299b2470ba8e317d1ff5
BLAKE2b-256 checksum
How to use checksums
757c5a4eac82091716ff0645e132dbd78884a41ce70bdcd3523acccd2b09d3d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / file_folder_tools-0.10-py3-none-any.whl

Download URL file_folder_tools-0.10-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ebf6fad51c2fbdf31e4e3b0c1edb40084a83d8dd16d37ef25ddb846b1e4e7e7
BLAKE2b-256 checksum
How to use checksums
90229dfaa4f99220e5dd5a0c77519ace9b67cd1ba2a54f75d1aa8e8891075869
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for file-folder-tools 0.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.10 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page