A Python project simulating a basic file system with block allocation, directory structure, and binary file handling.
- 💾 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.
Follow these steps to get your local copy of the file-system-manager up and running.
-
Clone the Repository Start by cloning the project repository to your local machine:
git clone https://github.com/ankitkumar-13/file-system-manager.git
-
Navigate to the Project Directory Change your current directory to the newly cloned project folder:
cd file-system-manager -
(Optional) Create a Virtual Environment It's highly recommended to use a virtual environment to manage project dependencies:
python -m venv venv
-
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
- On macOS/Linux:
-
(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
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 shellOur 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), andrm -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).
We welcome contributions to the file-system-manager project! To ensure a smooth collaboration, please follow these guidelines:
- Fork the Repository: Start by forking the repository to your GitHub account.
- Clone Your Fork: Clone your forked repository to your local machine.
- 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
- For new features:
- Code Style: Please adhere to PEP 8 for Python code style.
- Commit Changes: Make clear, concise commit messages.
- Write Tests: If you're adding new features or fixing bugs, please include relevant unit tests.
- Submit a Pull Request:
- Push your branch to your fork.
- Open a pull request from your branch to the
mainbranch of the original repository. - Provide a clear description of your changes and reference any related issues.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Copyright (c) 2025 ankitkumar-13.

