Coder Social home page Coder Social logo

vfs's Introduction

Virtual File System

The Virtual File System (VFS) is a distributed file system.

Build

Build third-party

libraries:

Windows:

$ ./build_thrid_party.sh

macOS:

$ brew install autoconf automake libtool pkg-config    
$ ./build_thrid_party_for_macos.sh

Protoc

Windows:

$ ./protoc.bat

macOS:

$ ./protoc_for_macos.sh

OUTPUT:

  • protoc: <project_root>/include/object.ph.h
  • grpc: <project_root>/src/object.grpc.ph.h

Build vfs

Windows/macOS:

$ mkdir build && cd build
$ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
// or: cmake -DCMAKE_BUILD_TYPE=Debug ..
$ cmake --build . 

Graph

              Server
       PULL   ┌─────┐   PUSH
    ┌─────────┤ VFS │◄────────┐
    │         └─────┘         │
    │                         │
    ▼                         │
 ┌─────┐ SYNC ┌─────┐ SYNC ┌──┴──┐
 │ VFS │◄────►│ VFS │◄────►│ VFS │
 └─────┘      └─────┘      └─────┘
 Client       Client       Client

Cli

Start Name Server

$ vfs_cli startserver 5555
listen at 0.0.0.0:5555

List Remote Directory

$ vfs_cli -s 127.0.0.1:5555 ls --path /
connected to server localhost:5555
1.txt
2.txt
3.txt

List Local Directory

$ vfs_cli ls --path /
1.txt
2/

recursive:

$ vfs_cli ls -r --path /
/
/1.txt
/dir1/
/dir1/dir2/
/dir1/dir2/file3

Create File

$ vfs_cli touch 6.txt --path /

Create Folder

$ vfs_cli mkdir testdir --path /

Delete File

$ vfs_cli rm 6.txt --path /

Delete Folder

$ vfs_cli rm -r testdir --path /

Rename File/Folder

$ vfs_cli mv 1.jpg 2.jpg --path /

vfs's People

Contributors

sandin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.