The Virtual File System is a Go project that provides a virtual file system capable of storing and managing files in a single file or database. It includes functionalities such as file compression, encryption, versioning, and caching.
✨ The file versioning system offers the following features:
-
Add File Versions: You can add new versions of a file along with the corresponding content, creation time, and modification time.
-
Update Files: Existing files can be updated with new content, automatically creating a new version with an incremented version number.
-
Retrieve Latest Version: You can easily retrieve the latest version of a file, allowing you to access the most up-to-date content.
-
Compressed Storage: The file content is stored in a compressed format, reducing storage space and improving efficiency.
🚀 The project utilizes the following technologies and tools:
- Golang (Go): A powerful and efficient programming language for building scalable applications.
- MongoDB: A popular NoSQL database for storing and managing data.
- Gzip: A compression algorithm used to compress and decompress file content.
👨💻 To get started with the file versioning system, follow these steps:
-
Prerequisites: Make sure you have Go and MongoDB installed on your machine.
-
Clone the Repository: Clone this repository to your local machine using the following command: git clone https://github.com/hackgods/virtual-file-system.git
-
Install Dependencies: Navigate to the project directory and install the required dependencies by running: go mod download
-
Configure MongoDB: Update the MongoDB connection details.
-
Build the Application: Build the application by running the following command: go build
-
Run the Application: Start the file versioning system by running the following command: ./virtual-file-system
🔧 Once the file versioning system is up and running, you can interact with it using the provided command-line interface (CLI). Here are some example commands:
signup- Create a new account.login- Login to your account.cd <directory>- Change the current working directory.pwd- Print the current working directory.mkdir <directory>- Create a new directory.rmdir <directory>- Remove a directory.ls- List the files and directories in the current directory.create <filename> <content>- Create a new fileread <filename>- Read the content of a fileupdate <filename> <content>- Update the content of a filedelete <filename>- Delete a filecompress <filename>- Compress the content of a filedecompress <filename>- Decompress the content of a fileencrypt <filename>- Encrypt the content of a filedecrypt <filename>- Decrypt the content of a filecache <filename>- Get the content of a file from cacheversion <filename>- Get the version details of a fileexit- Exit the program
🤝 Contributions are welcome! If you have any ideas, improvements, or bug fixes, feel free to submit a pull request. Please ensure that your code follows the project's coding conventions and includes appropriate tests.
📄 This project is licensed under the MIT License.
🙏 This project was inspired by the need to manage file versions effectively and efficiently.
📧 For any inquiries or feedback, please contact me at saurabhsuresh4s@gmail.com.
Happy versioning! 🎉