file-folder-tools


Namefile-folder-tools JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/file_folder_tools
SummarySome useful functions for files/folders
upload_time2023-01-05 07:13:36
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords files folders
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Some useful functions for files/folders

```python
# 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")



```




            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/file_folder_tools",
    "name": "file-folder-tools",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "files,folders",
    "author": "Johannes Fischer",
    "author_email": "<aulasparticularesdealemaosp@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/75/7c/5a4eac82091716ff0645e132dbd78884a41ce70bdcd3523acccd2b09d3d2/file_folder_tools-0.10.tar.gz",
    "platform": null,
    "description": "\n# Some useful functions for files/folders\n\n```python\n# Tested with:\n# Python 3.9.13\n# Windows 10\n\npip install file-folder-tools\n\n\nfrom file_folder_tools import *\n\nmaximize_console(lines=None)\n\n\nrm_dir(path=r\"F:\\testdele - Copy\", dryrun=True)\n\nsafeprint(\"oioi\")\n\npath = r\"F:\\bat.png\"\nset_file_read_only(path)\nset_file_writeable(path)\n\nstat_S_ENFMT_Record_locking_enforced(path)\n\nstat_S_IEXEC_Execute_by_owner(path)\n\nstat_S_IREAD_Read_by_owner(path)\n\nstat_S_IRGRP_Read_by_group(path)\n\nstat_S_IROTH_Read_by_others(path)\n\nstat_S_IRUSR_Read_by_owner(path)\n\nstat_S_IRWXG_Read_write_and_execute_by_group(path)\n\nstat_S_IRWXO_Read_write_and_execute_by_others(path)\n\nstat_S_IRWXU_Read_write_and_execute_by_owner(path)\n\nstat_S_ISGID_Set_group_ID_on_execution(path)\n\nstat_S_ISUID_Set_user_ID_on_execution(path)\n\nstat_S_ISVTX_Save_text_image_after_execution(path)\n\nstat_S_IWGRP_Write_by_group(path)\n\nstat_S_IWOTH_Write_by_others(path)\n\nstat_S_IWRITE_Write_by_owner(path)\n\nstat_S_IWUSR_Write_by_owner(path)\n\nstat_S_IXGRP_Execute_by_group(path)\n\nstat_S_IXOTH_Execute_by_others(path)\n\nstat_S_IXUSR_Execute_by_owner(path)\n\ntempfolder_string, function_to_remove = tempfolder()\n\nfunctions_to_remove, files, tempfolder_string_ = tempfolder_and_files(\n    fileprefix=\"tmp_\", numberoffiles=10, suffix=\".bin\", zfill=8\n)\n\nupdate_edit_time_of_file(path)\n\nwhat_is_it(path)\npklo = read_pkl(filename=r\"F:\\gutelautschrift.pkl\")\nwrite_pkl(object_=pklo, savepath=r\"F:\\gutelautschrift2.pkl\")\n\nconcat_files(\n    filenames=[r\"F:\\gutelautschrift.pkl\", r\"F:\\gutelautschrift2.pkl\"],\n    output=\"f:\\\\concatfiles.pkl\",\n)\n\ncreate_folder_if_not_there(folder=\"f:\\\\testen\")\n\ncreate_spooledtempfile_with_content(content=b\"xxxxxx\")\n\ndecode_filepath(path)\n\nenableLUA_disableLUA(enable=False)\n\nencode_filepath(path)\n\ngenerate_ssh_key(file_path=\"f:\\\\sshtestkey\", public_exponent=65537, key_size=2048)\n\nget_absolute_path_from_file(path)\n\nget_file_hash(filepath=\"appl.py\")\n\nget_filesize(path)\n\nget_hash_from_variable(variable=\"baba\")\n\nfilestring, removefunction = get_tmpfile(suffix=\".bin\")\n\nis_file_being_used(path)\n\nis_file_read_only(r\"F:\\bat.png\")\n\n\n\n```\n\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Some useful functions for files/folders",
    "version": "0.10",
    "split_keywords": [
        "files",
        "folders"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "90229dfaa4f99220e5dd5a0c77519ace9b67cd1ba2a54f75d1aa8e8891075869",
                "md5": "55e61e49c69e1ae13595780817d7921c",
                "sha256": "5ebf6fad51c2fbdf31e4e3b0c1edb40084a83d8dd16d37ef25ddb846b1e4e7e7"
            },
            "downloads": -1,
            "filename": "file_folder_tools-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "55e61e49c69e1ae13595780817d7921c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 8412,
            "upload_time": "2023-01-05T07:13:35",
            "upload_time_iso_8601": "2023-01-05T07:13:35.284184Z",
            "url": "https://files.pythonhosted.org/packages/90/22/9dfaa4f99220e5dd5a0c77519ace9b67cd1ba2a54f75d1aa8e8891075869/file_folder_tools-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "757c5a4eac82091716ff0645e132dbd78884a41ce70bdcd3523acccd2b09d3d2",
                "md5": "a39760d1ff883cf7404fccc6dd7aa7ae",
                "sha256": "672acf0131ef0ed0171cf646b8bf7acedae517d77e3d299b2470ba8e317d1ff5"
            },
            "downloads": -1,
            "filename": "file_folder_tools-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "a39760d1ff883cf7404fccc6dd7aa7ae",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6918,
            "upload_time": "2023-01-05T07:13:36",
            "upload_time_iso_8601": "2023-01-05T07:13:36.768999Z",
            "url": "https://files.pythonhosted.org/packages/75/7c/5a4eac82091716ff0645e132dbd78884a41ce70bdcd3523acccd2b09d3d2/file_folder_tools-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-05 07:13:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "hansalemaos",
    "github_project": "file_folder_tools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "file-folder-tools"
}
        
Elapsed time: 0.04703s