Skip to content

Shounak611/vertext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VerText (Versioned VFS - Modernized C++20 Edition)

VerText is a proof-of-concept Virtual File System (VFS) in C++ using FUSE 3. It monitors writes and file operations inside a virtual directory and archives versions of files automatically.

This version in the vertext repository is a modernized, refactored implementation leveraging C++20 features (specifically std::filesystem) for file system interactions and a customized, interactive dual-panel ncurses TUI for version inspection and recovery.

Architectural Enhancements

Unlike the legacy version, this repository uses:

  • std::filesystem: Replaces standard POSIX directory operations (opendir, readdir, mkdir, unlink) with C++20 filesystem pathways, improving platform safety and readability.
  • Dynamic Dual-Panel Focus Highlight: The ncurses TUI has been upgraded with color-coded window borders (active focus gets highlighted in green/bold, inactive in blue) to clearly show where keyboard navigation is currently active.
  • Robust Path Resolution: Employs cleaner path resolution in tui_main.cpp using hierarchical directory operations rather than manual string indexes.

Prerequisites

Ubuntu / Debian

sudo apt update
sudo apt install build-essential cmake libfuse3-dev libncurses-dev pkg-config

Building the Project

  1. Create and enter the build directory:

    mkdir -p build
    cd build
  2. Configure with CMake & Compile:

    cmake ..
    make

    This generates two binaries:

    • vfs_mount: The FUSE mounting daemon.
    • vfs_tui: The interactive version control inspector.

Running the Filesystem

1. Mount the VFS

Use the helper scripts provided:

# Mount to default path (/tmp/vfs_mount) in the background
./scripts/mount.sh

# Mount to a custom directory in the foreground for debug logs
./scripts/mount.sh <custom_mount_path> -f

2. Version Management TUI

Open the version inspector interface:

./scripts/run_tui.sh

Key Bindings:

  • UP / DOWN (or k / j): Navigate lists.
  • TAB: Toggle focus between the Files panel and the Version history panel.
  • ENTER: Select a file to load its version history.
  • R: Restore the selected version back to the active virtual workspace.
  • V: View the text content of the selected version directly in a popup viewer.
  • H: Display the Help dialog.
  • Q: Quit the TUI.

3. Clean Unmounting

To properly unmount and exit:

./scripts/unmount.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages