A console app for interacting with and managing a file system
-
File System Navigation:
Navigate through the file system tree using both relative and absolute paths. -
Directory and File Viewing:
- Display the contents of directories in the console.
- View file contents directly in the console.
-
File Operations:
- Move files.
- Copy files.
- Delete files.
- Rename files.
-
File System Abstraction:
Although only the local file system is implemented (with modelocal
), the architecture is designed to support switching between different file systems
-
Extensible Console Commands:
The system supports interaction via console commands that include flags. Command parameters can be easily extended without altering the core logic. -
Decoupled Command Processing:
The logic for processing console commands is separated from the business logic. This ensures that the command handling is not tied to the console, making it possible to replace or extend the command interface in the future. -
Independent Output Logic:
Both the logic for displaying directory contents and the logic for showing file content are decoupled from the console output. -
No Third-Party Libraries for Core Functionality:
In compliance with the project requirements, the implementation avoids the use of any third-party libraries for core file system operations and command processing, relying solely on standard .NET libraries and custom code.
The application supports a rich set of commands to interact with the file system. The key commands are as follows:
-
connect [Address] [-m Mode]
Connect to a file system at the specified absolute path.- Address: The absolute path to the file system.
- Mode: The file system mode (only
local
is implemented).
-
disconnect
Disconnect from the currently connected file system. -
tree goto [Path]
Navigate to a specific directory using either a relative or absolute path. -
tree list {-d Depth}
List the contents of the directory with a specified depth.- Depth: Declared with the
-d
flag; it determines how many levels deep the tree is traversed (default is 1).
- Depth: Declared with the
-
file show [Path] {-m Mode}
Display the contents of a file in the console.- Path: The relative or absolute path to the file.
- Mode: The output mode (only
console
is implemented).
-
file move [SourcePath] [DestinationPath]
Move a file from the source path to the destination directory. -
file copy [SourcePath] [DestinationPath]
Copy a file from the source path to the destination directory. -
file delete [Path]
Delete the file at the specified path. -
file rename [Path] [Name]
Rename the file at the specified path to the new name.