Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gregorykogan/file-system

Implementation of FAT file system.
https://github.com/gregorykogan/file-system

cli cpp fat filesystem

Last synced: 1 day ago
JSON representation

Implementation of FAT file system.

Awesome Lists containing this project

README

        

# file-system

![GitHub License](https://img.shields.io/github/license/GregoryKogan/file-system)

![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/GregoryKogan/file-system/cmake-multi-platform.yml?logo=github&label=tests)
![](https://tokei.ekzhang.com/b1/github/GregoryKogan/file-system)

Simple implementation of FAT file system

## Build
```shell
cmake -S . -B build && cmake --build build
```
CLI executable will be inside `build` directory.
To run it execute:
```shell
./build/cli
```

## Test
```shell
cd build
ctest
```

## CLI

### Commands

- `help` - show this message
- `exit` - exit the program
- `clear` - clear the screen



- `makefs ` - create a new file system
- `openfs ` - open an existing file system
- `fsinfo` - show file system info



- `dirname ` - get the directory portion of a pathname
- `basename ` - get the filename portion of a pathname
- `pwd` - print current working directory
- `ls [-l]` - list directory contents
- `stat ` - print file metadata
- `cat ` - print file contents
- `mkdir ` - create a directory
- `cd ` - change the working directory
- `touch ` - create a file
- `rmdir ` - remove a directory
- `rm [-r] ` - remove directory entries
- `cp [-r] ` - copy files and directories
- `mv [-r] ` - move files and directories



- `import ` - import a file from the host file system
- `export ` - export a file to the host file system