Condy v1.9
C++ Asynchronous System Call Layer for Linux
Loading...
Searching...
No Matches
fuse-prime-fs.cpp File Reference

FUSE prime file system server using condy. More...

#include <cassert>
#include <charconv>
#include <condy.hpp>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <dirent.h>
#include <fcntl.h>
#include <format>
#include <iostream>
#include <linux/fuse.h>
#include <memory>
#include <string>
#include <sys/mount.h>
#include <sys/signalfd.h>
#include <sys/stat.h>
#include <sys/sysinfo.h>
#include <thread>
#include <unistd.h>

Go to the source code of this file.

Detailed Description

FUSE prime file system server using condy.

This fs is inspired by https://github.com/hanwen/go-fuse/blob/master/fs/dynamic_example_test.go

It builds a dynamic tree over the integers 2..n (n is given by -n, default 10). The root is always a directory representing n, and lists 2..n-1 as its children. For each integer m:

  • if m is prime, it is a regular file whose content is the decimal value of m;
  • if m is composite, it is a directory that recursively contains all smaller numbers 2..m-1.

Definition in file fuse-prime-fs.cpp.