Welcome! This document outlines the development of a File Management System designed to manage and organize digital files efficiently. If you’re ready to start using the system, find out how here.
Follow these steps to install and set up the File Management System on your computer:
Prerequisites
Before Installing, ensure you have the following software requirments:
Step 1: Clone the Repository
Start by cloning the repository from GitHub. Open your terminal or command prompt and run the following command:
git clone https://github.com/EmiliosRichards/File-Management-System
Step 2: Navigate to the Project Directory
Change to the project directory with:
cd File Management System
Step 3: Configure Logging and Other Settings
Navigate to the config directory:
cd config
Make necessary adjustments to the logging.conf file to suit your needs. This configuration file dictates how logging is handled in the application, such as the log level and file outputs.
Step 5: Run the Application
Return to the main project directory and run the application:
cd ..
python FileManagementSystem.py
Step 6: Testing the Installation
After installation, it’s a good idea to test basic functionalities to ensure everything is working as expected. Try listing files, creating a new file, or other basic operations.
Using the File Management System:
If you encounter issues during the installation:
A File Management System (FMS) like Windows' File Explorer or macOS's Finder enables efficient management and organization of digital files. Such systems provide tools for creating, moving, renaming, and deleting files and folders through a user-friendly interface.
"You might wonder, 'Why create a custom FMS with options like File Explorer and Finder available?'" The answer lies in the unique learning opportunities and the ablity to surpass the limitations of traditional systems.
A custom-built FMS provides the following opportunities:
This project not only enhances technical skills but also surpasses the limitations of traditional file management systems, offering a tailored approach to file management.
Project Statement and Scope: The goal of this project is to develop a custom built file management system with python, utilising object oriented programming techniques. This process will also invlove the implementation of File IO operations and exception handling.
Objective: The objective of this project is to apply the python concepts mentioned above to create a user friendly custom built file management system. This system will be designed to store, retrieve, and manage documents or records in the form of text files, acting as a simple database.
Philosophy of project: Start Small: Begin with core functionalities that are common to all operating systems, and gradually expand features and capabilities.
The File Management System must be able to:
The File Management System should:
A simplified representation of how the File Manager will work:
Constant: Cancel/ back + exit appliction functionality.
This covers the design phase of the project.
This section, written after the completion of the build, details the actual construction process of the File Management System. It covers the implementation stages, from initial setup to final adjustments, and reflects on the integration of the planned features and functionalities.
To view the Finished Code Click Here
This section of the documentation describes the preliminary steps involved in preparing the development environment and managing dependencies for the File Management System project. These initial configurations are crucial for ensuring that development proceeds smoothly and consistently across different setups.
Choosing an IDE:
Installing Python:
Git Installation:
Remote Repository:
Creating a Virtual Environment:
conda create --name filemgmt python=3.8
conda activate filemgmt
Managing Dependencies with environment.yml
:
environment.yml
file was prepared to standardize setup if needed in the future:
name: filemgmt
dependencies:
- python=3.8
- pip:
- example-library==2.0 # Hypothetical library if needed
Utilized the Projects section of GitHub for planning and coordinating development.
This section delves into the architectural choices and data handling strategies employed in the development of the File Management System. It outlines the design decisions that facilitate efficient file and directory management through a command-line interface.
Choice of Interface:
Modular Code Structure:
FileManager
class: Manages high-level file operations.Document
class: Handles file-specific interactions (this is a conceptual placeholder as the system does not manage document contents directly).CLI
class: Encapsulates the command-line interface logic, providing a structured user interaction gateway.File and Directory Management:
Security Features:
Logging and Error Handling:
This architecture ensures that the File Management System is not only functional but also robust and user-friendly, catering to the needs of advanced users who prefer a command-line environment for file management tasks.
The development of the File Management System was meticulously planned and executed in phases, each designed to incrementally build the system's capabilities while integrating the necessary learning and problem-solving along the way.
Document
class was developed to handle operations on single documents, including reading, writing, and retrieving file sizes. Although these functionalities were ultimately not included in the final product, this class laid the foundational work for handling files.Static Functions and Security:
is_valid_path
and sanitize_filename
were implemented to enhance the system's security and ensure robustness against common vulnerabilities like directory traversal attacks.Exception Handling and Logging:
Integration:
Finishing Development:
if __name__ == "__main__"
block to allow direct execution of the program. This phase also included setting up command completion, enhancing the interactive CLI experience.Testing and Debugging:
Potential Features (Scoped Out):
The development of the File Management System was accompanied by rigorous testing and revision, ensuring a robust and user-friendly product. Each phase was critical in shaping the system's architecture, providing a solid foundation for future enhancements and maintenance.
The testing strategy for the File Management System aimed to ensure basic functionality and stability through a combination of scripted tests and hands-on experimentation. The approach was designed to be pragmatic, focusing on the essential operations of the system within the scope of its intended use.
Framework and Methodology:
Implementation:
unittest.mock
to simulate the environment and test the functionality in isolation. For example, os.listdir
and os.remove
were mocked to verify the system’s response to file listing and deletion commands without accessing the real filesystem.Hands-on Exploration:
Scope and Limitations:
Results and Adjustments:
Future Considerations:
This testing approach reflects a balance between thoroughness and practicality, appropriate for the system’s scale and complexity. It highlights areas where the system excels and acknowledges the potential for further enhancements in robustness and user interface design.
To view a test click on its name: File_Operations Copy File Success Copy File Conflicts Copy File Other
Reflecting on the development of the File Management System has provided invaluable insights into both technical skills and project management strategies. Here’s a breakdown of the key lessons learned:
Resilience and Problem-Solving:
Learning from Mistakes:
Programming and System Design:
os
and shutil
.Unit Testing and Quality Assurance:
Security Considerations:
This project was not just about building a functional file management system but also about personal and professional growth. The technical skills and project management insights gained have prepared me for future software development projects, emphasizing that the journey is just as important as the final product.
The development of the File Management System has laid a robust foundation for further enhancements and related projects. Here are several directions for future development:
Graphical User Interface (GUI):
Network Capabilities:
Advanced File Operations:
Security Enhancements:
Document Management System:
Data Backup and Recovery Tool:
Machine Learning for File Classification:
Blockchain for File Integrity:
Contributions are welcome! There are many ways you can contribute to this project:
Please adhere to the following steps for your contributions to be considered:
main
.For more information on how to contribute, please read the Contributions.md guide in our repository.
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or comments about the project, or if you're interested in contributing, feel free to reach out:
GitHub Docs: The GitHub documentation (https://docs.github.com/en) was a guide for using Git and GitHub for version control and project management, ensuring best practices in code sharing and collaboration.