Skip to content

kimvlry/console-file-system-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 

Repository files navigation

File System Manager

A console app for interacting with and managing a file system

Features

  • 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 mode local), the architecture is designed to support switching between different file systems

Design

  • 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.

Command Semantics

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).
  • 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.

About

A console app for interacting with and managing a file system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages