Skip to main content

No project description provided

Project description

Directory Manager Project

Overview

The Directory Manager Project is a Python extension written in Rust using PyO3. It facilitates efficient interaction with the filesystem, offering capabilities to handle files and directories. The project is cross-platform, compatible with both Unix-like and Windows systems.

Features

  • File and Directory Operations: Manage files and directories with functions for reading, writing, moving, and deleting.
  • Metadata Retrieval: Fetch file metadata such as last modified time, creation time, size, and read-only status.
  • Content Manipulation: Overwrite or append content in files.
  • Directory Traversal: Traverse, list, and perform batch operations on directories.
  • Custom Python Classes: Includes File, Directory, and DirectoryManager classes, each with specific functionalities.

How to Use (Python)

After installing the Directory Manager, you can use it in Python as follows:

  1. Create a Directory Manager Instance:

    from dirman import DirectoryManager
    dm = DirectoryManager('/path/to/directory')
    
  2. File Operations:

    • Reading a file:
      file = dm.find_file(name="example.txt")
      content = file.read()
      
    • Writing (overwriting) to a file:
      file.write_over("New content")
      
    • Appending to a file:
      file.concat("Additional content")
      
  3. Get Metadata:

    metadata = file.get_metadata()
    print(metadata['last_modified'], metadata['size'])
    
  4. Directory Operations:

    • Moving files:
      dm.move_files(name="example.txt",dest_directory_name="another_folder")
      
    • Deleting directories:
      dm.delete_directories(name="old_folder")
      

Building with Maturin (Rust Source)

Maturin is a build system to build and publish Rust-based Python packages with minimal configuration.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

DirMan-0.1.1.tar.gz (13.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

DirMan-0.1.1-cp310-none-win_amd64.whl (208.7 kB view details)

Uploaded CPython 3.10Windows x86-64

DirMan-0.1.1-cp37-none-win_amd64.whl (208.1 kB view details)

Uploaded CPython 3.7Windows x86-64

File details

Details for the file DirMan-0.1.1.tar.gz.

File metadata

  • Download URL: DirMan-0.1.1.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.7.0

File hashes

Hashes for DirMan-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e290c23b217107b1fd7b2c8a6077754b74eae0957f101b96481b24adff70ecb8
MD5 e593d90c69fb0ec95c9871c89fb53492
BLAKE2b-256 dedcf30fa0eea8a0b1c045ae589199ec316e041776ad80ceb3ef15b45262a969

See more details on using hashes here.

File details

Details for the file DirMan-0.1.1-cp310-none-win_amd64.whl.

File metadata

  • Download URL: DirMan-0.1.1-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 208.7 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.7.0

File hashes

Hashes for DirMan-0.1.1-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 ee202f660bf1fd6d2da5eb8468cc63323b1ab6154997c18d1213fa61dd0f611c
MD5 23597e450a7e5e039c2637ed4808c0c4
BLAKE2b-256 5f80f7963794cbd3589e4c943de2e8cd40dc614ee609a292aa0058072c0a05f1

See more details on using hashes here.

File details

Details for the file DirMan-0.1.1-cp37-none-win_amd64.whl.

File metadata

  • Download URL: DirMan-0.1.1-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 208.1 kB
  • Tags: CPython 3.7, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.7.0

File hashes

Hashes for DirMan-0.1.1-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 4b8d60f88e148b4e16e98bf15b946e6f496fa64ea0b0c3c59c7e391e1db94398
MD5 937570a02feceb1e6c34d41e93e2a09e
BLAKE2b-256 1e71de3c3fb528f99dd6c2971d88e89c0ca80b20998b7094e46aa5e3964946ce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page