A modern, high-performance Virtual File System (VFS) simulation and management application built using C# and Windows Forms (.NET 6.0). This project demonstrates core operating system concepts such as storage partitioning, dynamic space allocation, and hierarchical data structures through a polished user interface.
- 💾 Virtual Storage Management: Initialize custom virtual filesystems with specified storage capacities (saved with a custom
.dsfsextension). - 🎛️ Dynamic Partitioning: Create and format custom partitions within the virtual drive. Ensures physical boundaries are respected with dynamic space constraint checking.
- 📁 Hierarchical File Management: Full support for directory trees. Create folders and import real files into the virtual environment.
- ✂️ Clipboard Operations: Integrated Copy, Cut, and Paste mechanics across different partitions or nested directories with automatic allocation size verification.
- 📊 Live Resource Tracking: Status bar indicators instantly update to show selected item types, raw storage size, and remaining free space.
- 🔒 Binary Persistence: Automatically flushes state and serializes the complete file tree architecture natively into a binary stream upon closure.
The project deeply leverages solid Object-Oriented Programming (OOP) architectures:
- Composite Design Pattern:
Node: Abstract base class representing any entity within the system.Filesystem,Partition,Folder,MyFile: Inherit fromNodeto handle unified leaf/composite behavior.
- Resource Allocation & Verification:
- Dynamic sizing computation logic where the parent node monitors combined nested sizes while respecting maximum partition boundaries during file mutations.
├── 📂 WinFormsApp1
│ ├── 📄 Node.cs # Core abstract component for the Composite pattern
│ ├── 📄 Filesystem.cs # Root system manager handling global actions and .dsfs saving
│ ├── 📄 Partition.cs # Primary isolated storage segment bounds
│ ├── 📄 Folder.cs # Composite directory holding files or other folders
│ ├── 📄 MyFile.cs # Leaf node holding real injected file byte streams
│ ├── 📄 MyTreeNode.cs # Visual wrapper adapter mapping Nodes into Form UI components
│ ├── 📄 Form1.cs # Primary Application Explorer Dashboard UI
│ ├── 📄 Form2.cs # Creation Dialogue controller for filesystem properties
│ └── 📄 Program.cs # Main entry point hook
├── 📄 WinFormsApp1.sln # Visual Studio Solution wrapper
└── 📄 .gitignore # Configured exclusion specifications
- Framework: .NET 6.0 (Windows Forms)
- Language: C# 10
- Serialization:
System.Runtime.Serialization.Formatters.Binary
- .NET 6.0 SDK
- Visual Studio 2022 (with Windows Forms workload enabled)
- Clone the repository to your local directory.
- Open
WinFormsApp1.slninside Visual Studio. - Press F5 or click Start to compile and launch the File Explorer instance.
- Go to
File -> New Filesystemto allocate a custom disk matrix and play around with partitions and file configurations!
Developed as a lightweight demonstration of high-level VFS architectures. 🌟