Skip to content

Sampada-26/File-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple FUSE File System (C)

🚀 Overview

This project demonstrates a basic user-space filesystem using FUSE (Filesystem in Userspace). It mounts a virtual filesystem with one file, hello.txt, and supports simple read operations.

📁 Project Structure

./
├── disk.c
├── fs.h
├── fusefs
├── main.c
├── Makefile
├── README.md
└── mountdir/       # mount point directory for testing

🧱 Prerequisites (Ubuntu)

Install the required packages before building and running the project:

sudo apt update
sudo apt install -y libfuse-dev fuse pkg-config build-essential

On Ubuntu, build-essential provides gcc, make, and other common build tools.

⚙️ Build and Run

  1. Build the filesystem binary:
make
  1. Create the mount point directory if it does not exist:
mkdir -p mountdir
  1. Run the FUSE filesystem:
./fusefs mountdir
  1. Open a new terminal or background the process, then access the mounted filesystem:
cd mountdir
ls
cat hello.txt

🧹 Unmount

When you are done, unmount the filesystem:

fusermount -u mountdir

📌 Expected Output

hello.txt
Hello from FUSE filesystem!

💡 Notes

  • fusefs must run with FUSE available on the system.
  • If ./fusefs mountdir does not return, it is running in foreground and keeping the filesystem mounted.
  • Use fusermount -u mountdir to cleanly unmount before deleting mountdir.

⭐ Future Improvements

  • Add write support
  • Add multiple files
  • Add directory hierarchy
  • Implement deletion and rename operations

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors