Skip to content

ankitkumar-13/file-system-manager

Repository files navigation

🗂️ File System Manager

A Python project simulating a basic file system with block allocation, directory structure, and binary file handling.

Version License Stars Forks

File System Manager Preview

✨ Features

  • 💾 Block Allocation Management: Efficiently simulates disk space utilization and management using a block-based allocation system.
  • 📁 Hierarchical Directory Structure: Supports the creation and manipulation of a nested directory and file system, mirroring real-world operating systems.
  • 📝 Binary File Handling: Enables the creation, reading, and writing of binary data within the simulated file system environment.
  • 🖥️ Interactive Command-Line Interface: Provides an intuitive set of commands to interact with and manage the file system.
  • 🔄 Data Persistence: Ensures that the state of the file system (directories, files, and their contents) is saved and loaded across sessions.

🚀 Installation

Follow these steps to get your local copy of the file-system-manager up and running.

  1. Clone the Repository Start by cloning the project repository to your local machine:

    git clone https://github.com/ankitkumar-13/file-system-manager.git
  2. Navigate to the Project Directory Change your current directory to the newly cloned project folder:

    cd file-system-manager
  3. (Optional) Create a Virtual Environment It's highly recommended to use a virtual environment to manage project dependencies:

    python -m venv venv
  4. Activate the Virtual Environment Activate the virtual environment. The command depends on your operating system:

    • On macOS/Linux:
      source venv/bin/activate
    • On Windows:
      .\venv\Scripts\activate
  5. (Optional) Install Dependencies If the project had any external Python dependencies, you would install them using pip. For this basic file system simulation, there might not be any, but it's good practice to check:

    # If a requirements.txt file exists:
    # pip install -r requirements.txt

💡 Usage

To start the file system manager and interact with it, run the manage.py script. This will typically launch an interactive shell where you can execute file system commands.

# Ensure your virtual environment is activated (if you created one)
# source venv/bin/activate # macOS/Linux
# .\venv\Scripts\activate   # Windows

# Run the file system manager
python manage.py

# Once inside the interactive shell, you can use commands like:
# mkdir /my_directory             # Create a new directory
# touch /my_directory/my_file.txt # Create an empty file
# ls /my_directory                # List contents of a directory
# write /my_directory/my_file.txt "Hello File System!" # Write content to a file
# cat /my_directory/my_file.txt   # Read and display file content
# exit                            # Exit the file system shell

Usage Example Screenshot

🗺️ Project Roadmap

Our vision for the file-system-manager includes continuous improvement and the addition of new features. Here's what's planned for the future:

  • Advanced File Operations: Implement mv (move), cp (copy), and rm -r (recursive delete) commands.
  • User and Permission Management: Introduce basic user accounts and file/directory permission settings.
  • Journaling/Fault Tolerance: Explore mechanisms for data integrity and recovery in case of unexpected shutdowns.
  • Graphical User Interface (GUI): Develop a simple GUI for a more visual and user-friendly interaction experience.
  • Optimization of Allocation Strategies: Investigate and implement more sophisticated block allocation methods (e.g., indexed allocation, linked allocation).

🤝 Contributing

We welcome contributions to the file-system-manager project! To ensure a smooth collaboration, please follow these guidelines:

  1. Fork the Repository: Start by forking the repository to your GitHub account.
  2. Clone Your Fork: Clone your forked repository to your local machine.
  3. Create a New Branch:
    • For new features: git checkout -b feature/your-feature-name
    • For bug fixes: git checkout -b bugfix/issue-description
    • For critical fixes: git checkout -b hotfix/critical-fix
  4. Code Style: Please adhere to PEP 8 for Python code style.
  5. Commit Changes: Make clear, concise commit messages.
  6. Write Tests: If you're adding new features or fixing bugs, please include relevant unit tests.
  7. Submit a Pull Request:
    • Push your branch to your fork.
    • Open a pull request from your branch to the main branch of the original repository.
    • Provide a clear description of your changes and reference any related issues.

📄 License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

Copyright (c) 2025 ankitkumar-13.

About

Python project simulating a basic file system with block allocation, directory structure, and binary file handling.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors