https://github.com/karpeleslab/vfs
Virtual filesystem abstraction for Go
https://github.com/karpeleslab/vfs
golang vfs
Last synced: 12 months ago
JSON representation
Virtual filesystem abstraction for Go
- Host: GitHub
- URL: https://github.com/karpeleslab/vfs
- Owner: KarpelesLab
- License: mit
- Created: 2020-01-12T07:12:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-06-30T06:59:42.000Z (almost 3 years ago)
- Last Synced: 2025-07-01T00:09:03.910Z (12 months ago)
- Topics: golang, vfs
- Language: Go
- Size: 46.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/KarpelesLab/vfs)
[](https://godoc.org/github.com/KarpelesLab/vfs)
[](https://coveralls.io/github/KarpelesLab/vfs?branch=master)
# Filesystem Abstraction in Go
Yet another one, created because none [of the bazillon existing Golang VFS](https://awesome-go.com/#files) matched
the needs we have.
Specifically, many tend to be either oriented toward local filesystems or cloud
storage providers. Typically, both are very different. Local filesystems allow
files to be modified, while cloud providers typically require a whole file to
be re-uploaded for any change. As such, cloud-oriented libraries may support
local filesystem but have no API for partial writes locally.
Here, cloud storage solutions such as AWS S3 are considered "keyvals", similar
to databases where changing a byte in a value requires rewriting the whole
value.
The goal is to be able to offer converter interfaces that expose such
backends as proper filesystems supporting partial writes.
# Focus
This implementation focuses on the following goals:
* Stay as close as possible to filesystem concepts
* Be as compatible as possible with Golang's interfaces
* Be as simple as possible to extend
* Allow working with limited key/value backends
# Features
* Filesystem Backends:
* localfs filesystem
* memfs
* zipfs (read only)
* Keyval Backends:
* memkv
* boltkv using [boltdb](https://github.com/boltdb/bolt)
* Converters:
* vdirfs: provides directory indexation/listing for backends which do not have this feature (such as zipfs)
## Planned
* Support for a wide range of backends (AWS S3, etc)
* Support for frontends (fuse, http, etc)
* Middlewares (keyval→filesystem adapters, encryption, etc)