Vanfs (vandi's virtual file system) is a virtual file system.
Caution
IT ISN'T A VIRTUAL OS!!!
Vanfs isn't supposed to be a real file system, it only looks like a file system.
To install vanfs on windows you need to follow this steps
-
Prepare
install go if you don't have it.
-
Install
go install github.com/vandi37/vanfs@latest
-
Enjoy your vanfs
vanfs
To install vanfs on linux or macos you need to follow this steps
-
Prepare
install go if you don't have it.
install git if you don't have it.
-
Clone the repository.
git clone https://github.com/vandi37/vanfs.git cd vanfs
-
Install.
You have two variants
-
Use Makefile
make install # you can edit the bin path in the Makefile
-
Warning
Be sure that you are at the root of the project.
2. Install by yourself
```bash
sudo rm -rf /usr/bin/vanfs # or your bin path
go build
sudo mv vanfs /usr/bin # or your bin path
```
Warning
Be sure that you are at the root of the project.
-
Enjoy your vanfs
vanfs
If you run the program you will see the start menu
-
to choose a variant use arrows up and down
-
to exit use ctrl+c
To storage the directory tree and all file data should be a directory (in the real filesystem) with all files and the file with tree
You can enter any name.
Default name will be vfs
After you need to enter path to backup directory
The directory should exist, or the program will trow an error
Default will be current path/vfs_backup/
Congratulations! You have created your vanfs
Enter path to backup directory
Congratulations! You have loaded your vanfs
It loads from env.
to set path you need on linux you can do this
export VFS_PATH="/home/your_username/vfs_data"
The directory should exist, or the program will trow an error
After running vanfs and choosing "Load from default path" the vfs will load
After creating and loading your vfs you can run this commands
-
cd {path}
move your current directory to another directory
-
cd /
moves you to the root
-
cd ..
moves a directory higher in the directory tree
Tip
you can use
cd ../..
going two directories higher
cd ../../..
going three directories higher
cd /home
going to home directory
Tip
ls shows the list of directories and files
-
mkdir {path for cd}/{name}
creates a directory as the command was
cd {path for cd} mkdir {name}
however cd can't move to not existing directory, and here it will create all directories that not exist.
-
rmdir {name}
removes a directory with name
-
rmdir {path for cd}/{name}
as
rmdir {path for cd}/{name}
it is as
cd {path for cd} rmdir {name}
and here if any directory in cd command or in rmdir does not exist it sends an error
-
of {name}
opens a file i text editor based on text area
you can write any text
to save
ctrl+s
to exit
ctrl+c
Tip
for all {name} it is the same as with mkdir with entering any path.
-
ls {path (could be empty)}
shows list of all directories and files
-
tree {path (could be empty)}
shows the tree