A FileSystem Abstraction System for Go

afero logo-sm

A FileSystem Abstraction System for Go

Build Status Build status GoDoc Join the chat at https://gitter.im/spf13/afero

Overview

Afero is a filesystem framework providing a simple, uniform and universal API interacting with any filesystem, as an abstraction layer providing interfaces, types and methods. Afero has an exceptionally clean interface and simple design without needless constructors or initialization methods.

Afero is also a library providing a base set of interoperable backend filesystems that make it easy to work with afero while retaining all the power and benefit of the os and ioutil packages.

Afero provides significant improvements over using the os package alone, most notably the ability to create mock and testing filesystems without relying on the disk.

It is suitable for use in any situation where you would consider using the OS package as it provides an additional abstraction that makes it easy to use a memory backed file system during testing. It also adds support for the http filesystem for full interoperability.

Afero Features

  • A single consistent API for accessing a variety of filesystems
  • Interoperation between a variety of file system types
  • A set of interfaces to encourage and enforce interoperability between backends
  • An atomic cross platform memory backed file system
  • Support for compositional (union) file systems by combining multiple file systems acting as one
  • Specialized backends which modify existing filesystems (Read Only, Regexp filtered)
  • A set of utility functions ported from io, ioutil & hugo to be afero aware

Using Afero

Afero is easy to use and easier to adopt.

A few different ways you could use Afero:

  • Use the interfaces alone to define your own file system.
  • Wrapper for the OS packages.
  • Define different filesystems for different parts of your application.
  • Use Afero for mock filesystems while testing

Step 1: Install Afero

First use go get to install the latest version of the library.

$ go get github.com/spf13/afero

Next include Afero in your application.

import "github.com/spf13/afero"

Step 2: Declare a backend

First define a package variable and set it to a pointer to a filesystem.

var AppFs = afero.NewMemMapFs()

or

var AppFs = afero.NewOsFs()

It is important to note that if you repeat the composite literal you will be using a completely new and isolated filesystem. In the case of OsFs it will still use the same underlying filesystem but will reduce the ability to drop in other filesystems as desired.

Step 3: Use it like you would the OS package

Throughout your application use any function and method like you normally would.

So if my application before had:

os.Open('/tmp/foo')

We would replace it with:

AppFs.Open('/tmp/foo')

AppFs being the variable we defined above.

List of all available functions

File System Methods Available:

Chmod(name string, mode os.FileMode) : error
Chown(name string, uid, gid int) : error
Chtimes(name string, atime time.Time, mtime time.Time) : error
Create(name string) : File, error
Mkdir(name string, perm os.FileMode) : error
MkdirAll(path string, perm os.FileMode) : error
Name() : string
Open(name string) : File, error
OpenFile(name string, flag int, perm os.FileMode) : File, error
Remove(name string) : error
RemoveAll(path string) : error
Rename(oldname, newname string) : error
Stat(name string) : os.FileInfo, error

File Interfaces and Methods Available:

io.Closer
io.Reader
io.ReaderAt
io.Seeker
io.Writer
io.WriterAt

Name() : string
Readdir(count int) : []os.FileInfo, error
Readdirnames(n int) : []string, error
Stat() : os.FileInfo, error
Sync() : error
Truncate(size int64) : error
WriteString(s string) : ret int, err error

In some applications it may make sense to define a new package that simply exports the file system variable for easy access from anywhere.

Using Afero's utility functions

Afero provides a set of functions to make it easier to use the underlying file systems. These functions have been primarily ported from io & ioutil with some developed for Hugo.

The afero utilities support all afero compatible backends.

The list of utilities includes:

DirExists(path string) (bool, error)
Exists(path string) (bool, error)
FileContainsBytes(filename string, subslice []byte) (bool, error)
GetTempDir(subPath string) string
IsDir(path string) (bool, error)
IsEmpty(path string) (bool, error)
ReadDir(dirname string) ([]os.FileInfo, error)
ReadFile(filename string) ([]byte, error)
SafeWriteReader(path string, r io.Reader) (err error)
TempDir(dir, prefix string) (name string, err error)
TempFile(dir, prefix string) (f File, err error)
Walk(root string, walkFn filepath.WalkFunc) error
WriteFile(filename string, data []byte, perm os.FileMode) error
WriteReader(path string, r io.Reader) (err error)

For a complete list see Afero's GoDoc

They are available under two different approaches to use. You can either call them directly where the first parameter of each function will be the file system, or you can declare a new Afero, a custom type used to bind these functions as methods to a given filesystem.

Calling utilities directly

fs := new(afero.MemMapFs)
f, err := afero.TempFile(fs,"", "ioutil-test")

Calling via Afero

fs := afero.NewMemMapFs()
afs := &afero.Afero{Fs: fs}
f, err := afs.TempFile("", "ioutil-test")

Using Afero for Testing

There is a large benefit to using a mock filesystem for testing. It has a completely blank state every time it is initialized and can be easily reproducible regardless of OS. You could create files to your heart’s content and the file access would be fast while also saving you from all the annoying issues with deleting temporary files, Windows file locking, etc. The MemMapFs backend is perfect for testing.

  • Much faster than performing I/O operations on disk
  • Avoid security issues and permissions
  • Far more control. 'rm -rf /' with confidence
  • Test setup is far more easier to do
  • No test cleanup needed

One way to accomplish this is to define a variable as mentioned above. In your application this will be set to afero.NewOsFs() during testing you can set it to afero.NewMemMapFs().

It wouldn't be uncommon to have each test initialize a blank slate memory backend. To do this I would define my appFS = afero.NewOsFs() somewhere appropriate in my application code. This approach ensures that Tests are order independent, with no test relying on the state left by an earlier test.

Then in my tests I would initialize a new MemMapFs for each test:

func TestExist(t *testing.T) {
	appFS := afero.NewMemMapFs()
	// create test files and directories
	appFS.MkdirAll("src/a", 0755)
	afero.WriteFile(appFS, "src/a/b", []byte("file b"), 0644)
	afero.WriteFile(appFS, "src/c", []byte("file c"), 0644)
	name := "src/c"
	_, err := appFS.Stat(name)
	if os.IsNotExist(err) {
		t.Errorf("file \"%s\" does not exist.\n", name)
	}
}

Available Backends

Operating System Native

OsFs

The first is simply a wrapper around the native OS calls. This makes it very easy to use as all of the calls are the same as the existing OS calls. It also makes it trivial to have your code use the OS during operation and a mock filesystem during testing or as needed.

appfs := afero.NewOsFs()
appfs.MkdirAll("src/a", 0755)

Memory Backed Storage

MemMapFs

Afero also provides a fully atomic memory backed filesystem perfect for use in mocking and to speed up unnecessary disk io when persistence isn’t necessary. It is fully concurrent and will work within go routines safely.

mm := afero.NewMemMapFs()
mm.MkdirAll("src/a", 0755)

InMemoryFile

As part of MemMapFs, Afero also provides an atomic, fully concurrent memory backed file implementation. This can be used in other memory backed file systems with ease. Plans are to add a radix tree memory stored file system using InMemoryFile.

Network Interfaces

SftpFs

Afero has experimental support for secure file transfer protocol (sftp). Which can be used to perform file operations over a encrypted channel.

Filtering Backends

BasePathFs

The BasePathFs restricts all operations to a given path within an Fs. The given file name to the operations on this Fs will be prepended with the base path before calling the source Fs.

bp := afero.NewBasePathFs(afero.NewOsFs(), "/base/path")

ReadOnlyFs

A thin wrapper around the source Fs providing a read only view.

fs := afero.NewReadOnlyFs(afero.NewOsFs())
_, err := fs.Create("/file.txt")
// err = syscall.EPERM

RegexpFs

A filtered view on file names, any file NOT matching the passed regexp will be treated as non-existing. Files not matching the regexp provided will not be created. Directories are not filtered.

fs := afero.NewRegexpFs(afero.NewMemMapFs(), regexp.MustCompile(`\.txt$`))
_, err := fs.Create("/file.html")
// err = syscall.ENOENT

HttpFs

Afero provides an http compatible backend which can wrap any of the existing backends.

The Http package requires a slightly specific version of Open which returns an http.File type.

Afero provides an httpFs file system which satisfies this requirement. Any Afero FileSystem can be used as an httpFs.

httpFs := afero.NewHttpFs(<ExistingFS>)
fileserver := http.FileServer(httpFs.Dir(<PATH>))
http.Handle("/", fileserver)

Composite Backends

Afero provides the ability have two filesystems (or more) act as a single file system.

CacheOnReadFs

The CacheOnReadFs will lazily make copies of any accessed files from the base layer into the overlay. Subsequent reads will be pulled from the overlay directly permitting the request is within the cache duration of when it was created in the overlay.

If the base filesystem is writeable, any changes to files will be done first to the base, then to the overlay layer. Write calls to open file handles like Write() or Truncate() to the overlay first.

To writing files to the overlay only, you can use the overlay Fs directly (not via the union Fs).

Cache files in the layer for the given time.Duration, a cache duration of 0 means "forever" meaning the file will not be re-requested from the base ever.

A read-only base will make the overlay also read-only but still copy files from the base to the overlay when they're not present (or outdated) in the caching layer.

base := afero.NewOsFs()
layer := afero.NewMemMapFs()
ufs := afero.NewCacheOnReadFs(base, layer, 100 * time.Second)

CopyOnWriteFs()

The CopyOnWriteFs is a read only base file system with a potentially writeable layer on top.

Read operations will first look in the overlay and if not found there, will serve the file from the base.

Changes to the file system will only be made in the overlay.

Any attempt to modify a file found only in the base will copy the file to the overlay layer before modification (including opening a file with a writable handle).

Removing and Renaming files present only in the base layer is not currently permitted. If a file is present in the base layer and the overlay, only the overlay will be removed/renamed.

	base := afero.NewOsFs()
	roBase := afero.NewReadOnlyFs(base)
	ufs := afero.NewCopyOnWriteFs(roBase, afero.NewMemMapFs())

	fh, _ = ufs.Create("/home/test/file2.txt")
	fh.WriteString("This is a test")
	fh.Close()

In this example all write operations will only occur in memory (MemMapFs) leaving the base filesystem (OsFs) untouched.

Desired/possible backends

The following is a short list of possible backends we hope someone will implement:

  • SSH
  • S3

About the project

What's in the name

Afero comes from the latin roots Ad-Facere.

"Ad" is a prefix meaning "to".

"Facere" is a form of the root "faciō" making "make or do".

The literal meaning of afero is "to make" or "to do" which seems very fitting for a library that allows one to make files and directories and do things with them.

The English word that shares the same roots as Afero is "affair". Affair shares the same concept but as a noun it means "something that is made or done" or "an object of a particular type".

It's also nice that unlike some of my other libraries (hugo, cobra, viper) it Googles very well.

Release Notes

See the Releases Page.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Contributors

Names in no particular order:

License

Afero is released under the Apache 2.0 license. See LICENSE.txt

Owner
Steve Francia
@golang product lead at @google • Author, Speaker, Developer • Creator of @gohugoio, Cobra, Viper & spf13-vim • former @docker & @mongodb
Steve Francia
Comments
  • Add GCS Fs implementation

    Add GCS Fs implementation

    An implementation of GCS Fs, based on https://github.com/spf13/afero/pull/161

    Thanks @Zatte for the inital implementation!

    Changes vs the original PR:

    • Based on the latest master
    • Uses client as its base abstraction, not bucket => bucket is thus a part of path, the first component in it (!)
    • Has kinks and quirks of the GCS API "ironed out"
    • Has its own test suite now, based off the TarFS one with extra parts to test the writing/folders making scenarios
    • The suite allows for testing both with mocks and with the real bucket (see commented out block in the tests setup)
    • File modes are exactly those that are provided during files/directories opening. If not provided, defaults to 0755

    Bonus:

    • Supports gs://<bucket>/<path> URLs too, even though it's explicitly excluded from tests, since afero in general does not work with URLs.

    The original PR notes, which still apply to this version of the implementation + extra for this version:

    Limitations:

    • No Chmod support - The GCS ACL could probably be mapped to *nix style permissions but that would add another level of complexity and is ignored in this version.
    • No Chtimes support - Could be simulated with attributes (gcs a/m-times are set implicitly) but that's is left for another version.
    • NOTE: Not thread safe - Also assumes all file operations are done through the same instance of the GcsFs. File operations between different GcsFs instances are not guaranteed to be consistent.

    Performance implications

    • Sequential reads are performant
    • Sequential writes are performant.
    • Seek + Read or ReadAt is performant after the initial seek. (produces a warning)
    • Alternating reads/writes to the same file handler are highly inefficient. To get consistent FS behavior using an API that separates readers and writers we close any open readers before an write as well close open writers before a read (ensure the data is committed).
    • Seek + Write such as WriteAt, Truncate, Seek+Write will work as expected but with significant overhead. Doing a seek + write will in effect download the old file/object, overlay it with the new writes and save it back. This is done in a streaming fashion so large files will not clog the memory but will trigger a full download and upload of the file/object.
  • S3 FS implementation

    S3 FS implementation

    This is a mostly-working/mostly-tested implementation of S3 as an FS.

    There are some gaps in the implementation, but it is otherwise pretty functional:

    • It doesn't support non-offset == 0 reads or writes
    • It doesn't support Truncate
    • It doesn't support Seek with whence set to 2
    • It doesn't support opening a file in append mode

    All of these things increase the complexity of the implementation significantly (some are questionably well-defined, e.g. append in an eventually-consistent FS like S3), so for now I've left them out.

    In order to reduce clutter in the root package github.com/spf13/afero, I put the whole implementation + tests in a sub package, github.com/spf13/afero/s3. In order to leverage the generic Fs tests in afero_test.go, I copy-pasted them into a sub package github.com/spf13/afero/tests. I also added a few tests to this file as I went along.

    In order to run the tests you must pass a bucket: go test -v github.com/spf13/afero/s3 -s3bucket <test bucket>. You also need to set AWS_REGION, AWS_ACCESS_KEY_ID, and AWS_SECRET_ACCESS_KEY.

    Let me know what you think 😄

  • Fix data race in InMemoryFile by locking Read and Write.

    Fix data race in InMemoryFile by locking Read and Write.

    Adds a sync.Mutex to the InMemoryFile struct to lock f.data field access in the Read and Write methods.

    Also locks access to f.closed in Open and Close methods.

    Fixes: #8.

  • Add afero.Symlink

    Add afero.Symlink

    Hi, afero.Symlink() does not seem to be implemented. Are there any plans to add this method? See os.Symlink for reference. If you point me to the right direction, I could aso try to implement it myself.

  • Explain the difference between filter and filesystem better

    Explain the difference between filter and filesystem better

    @vetinari The recent additions you've provided are great. Well written and thoughtfully done. In reading through the readme, it's not at all apparent what the difference is between a filter and a filesystem considering both adhere to the same interface.

    As I see it the main difference is that the filter is stackable at call time where any combination of filesystems as a filesystem needs to be predefined. It does beg the question though if everything should be a filter (or if we should incorporate that functionality into the FS since that's a compelling feature.

    If you could elaborate on the readme I'm sure many would benefit.

  • Add optional interfaces for Symlink and Readlink

    Add optional interfaces for Symlink and Readlink

    I created two interfaces to facilitate file systems optionally supporting the Symlink and Readlink operations from the os implementation.

    type Linker interface {
    	SymlinkIfPossible(oldname, newname string) error
    }
    type LinkReader interface {
    	ReadlinkIfPossible(name string) (string, error)
    }
    

    I opted to write them this way to preserve consistency with the Lstater interface created by @bep

    The actual Symlink and Readlink are only implemented in the OsFs, with proxy support in:

    • BasePathFs,
    • CopyOnWriteFs, and
    • ReadOnlyFs

    for consistency with the other two I implemented the Linker interface on ReadOnlyFs with it just returning a not supported error. I would appreciate feedback if this is the correct pattern, or if I should instead remove the method?

    The motivation for this change was to allow wrapping an existing use of afero in a project with the go-billy interface to allow a git integration to support a client request. The implementation is in the process of being tested in our logic, but I wanted to create the pull request and get feedback and make any necessary changes early.

  • Google cloud storage v1

    Google cloud storage v1

    A patch to add google cloud storage support to Afero using GCS strong consistency guarantees to implement almost all afero intefaces.

    V1 scope limitations:

    • No Chmod support - The GCS ACL could probably be mapped to *nix style permissions but that would add another level of complexity and is ignored in this version.
    • No Chtimes support - Could be simulated with attributes (gcs a/m-times are set implicitly) but that's is left for another version.
    • NOTE: Not thread safe - Also assumes all file operations are done through the same instance of the GcsFs. File operations between different GcsFs instances are not guaranteed to be consistent.
    • File modes will always bee 0755/0664 for folders/files when read back

    Performance implications

    • Sequential reads are performant
    • Sequential writes are performant.
    • Seek + Read or ReadAt is performant after the initial seek.
    • Alternating reads/writes to the same file handler are highly inefficient. To get consistent FS behavior using an API that separates readers and writers we close any open readers before an write as well close open writers before a read (ensure the data is committed).
    • Seek + Write such as WriteAt, Truncate, Seek+Write will work as expected but with significant overhead. Doing a seek + write will in effect download the old file/object, overlay it with the new writes and save it back. This is done in a streaming fashion so large files will not clog the memory but will trigger a full download and upload of the file/object.

    How to test:

    • Ensure you have a service account setup and $GOOGLE_APPLICATION_CREDENTIALS pointing to that file. Other methods for creating a client are supported by manually creating the gcloud client and using NewGcsFs(...) instead of NewGcsFsFromDefaultCredentials(...) as below
    • Update afero_test.go
    var gcsFs = NewGcsFsFromDefaultCredentials(context.Background(), "[GCS_BUCKET_USED_FOR_TESTING]", string(filepath.Separator))
    var Fss = []Fs{&MemMapFs{}, &OsFs{}, gcsFs }
    
  • sftp_test_go

    sftp_test_go

    I assume this is failing ? I am needing to connect to a sftp server, that does not use ssh key pair, and thought i woudl give this a try, but the fact that the test for SFTP is stubbed out makes me think its stubbed out because it is not ready.

    The test is trying to setup a local SFTP server. I am working against this SFTP server. http://docs.ipswitch.com/WS_FTP_Server71/ReleaseNotes/index.htm?k_id=ipswitch_com_ftp_documents_worldwide_ws_ftpserverv71releasenotes

    Can you let me know please.

  • Add Symlinker, Readlinker, EvalSymlinks.

    Add Symlinker, Readlinker, EvalSymlinks.

    Related: issue #174

    This PR improves symlink-related functionality in all afero fs types except the memory fs (still not sure what to do there).

    Note that I haven't tested anywhere but linux.

  • fix Readdir() and Readdirnames()

    fix Readdir() and Readdirnames()

    fixes #7

    I first had to fix registerWithParent(), unRegisterWithParent() and findParent() to correctly use the MemDir of the parent directory. Then I added versions of Open() and Mkdir() that don't acquire a lock, that they can be used atomically during Create() and Mkdir(). Finally I changed the output of the InMemoryFileInfo.Name() and Readdirnames() functions to only return the last element of the path, as does the os package. I also added some tests.

  • Consider allowing other maintainers or moving to a github organization

    Consider allowing other maintainers or moving to a github organization

    Hello!

    Would you consider allowing other maintainers or moving to a github organization?

    There are a number of pull requests that date about two years and that have not gotten responses.

    If there was an afero organization on github, it could contain several repositories with file system implementation packages. You wouldn't have to merge them in the main repository and it would help the community organize around something.

    You could keep control of the main repository but give commit access to people in other repositories inside the github organization.

  • [QUESTION] Convert embed.FS to afero.MemMapFS

    [QUESTION] Convert embed.FS to afero.MemMapFS

    As the title says is it possible to convert and embed.FS to a MemMapFS? This way I can make the memory FS writable too.

    I want to use that FS within fiber, this FS will contains html templates, so a wanna have a set of predefined/default templates defined as (embed.FS) but I also want to be able to add more templates at runtime, thus the request to convert embed.FS to MemMapFS

  • Consider updating declared Go version in go.mod

    Consider updating declared Go version in go.mod

    The go.mod file declares go 1.16 right now. Module graph pruning was added in Go 1.17, meaning that other modules can import your module and only pick up the transitive dependencies that are actually reachable based on how they use your code. Right now, importing afero means importing a cloud apis, because the declared go version predates go 1.17.

    The tidiest dependency graph will come from using go 1.18,

    The go.sum file recorded by go mod tidy for a module by default includes checksums needed by the Go version one below the version specified in its go directive. So a go 1.17 module includes checksums needed for the full module graph loaded by Go 1.16, but a go 1.18 module will include only the checksums needed for the pruned module graph loaded by Go 1.17. The -compat flag can be used to override the default version (for example, to prune the go.sum file more aggressively in a go 1.17 module).

    Go 1.18 is also the oldest Go release still supported by the Go team, so it's a reasonable choice of language version to declare.

  • CVE-2022-32149: golang.org/x/text < 0.3.8

    CVE-2022-32149: golang.org/x/text < 0.3.8

  • MemMapFs MkdirAll error in parallel tests after go 1.18

    MemMapFs MkdirAll error in parallel tests after go 1.18

    Creating a MemMapFs in a table driven test running in parallel can cause an internal compiler error.

    Minimal reproduction test code:

    func TestMkdirAll_fails(t *testing.T) {
    	var tests = []struct {
    		fs afero.Fs
    	}{
    		{
    			fs: func() afero.Fs {
    				fs := afero.NewMemMapFs()
    				fs.MkdirAll("/home/alice", 0755)
    				return fs
    			}(),
    		},
    	}
    
    	for _, tc := range tests {
    		tc := tc // capture range variable
    		t.Run("sub_test", func(t *testing.T) {
    			_ = tc.fs
    		})
    	}
    }
    

    Produces the error:

    ./mkdirall_test.go:16:16: internal compiler error: order.stmt CALLMETH
    
    Please file a bug report including a short program that triggers the error.
    https://go.dev/issue/new
    

    Versions

    This works without error on golang 1.17.13. It fails for me on go 1.18.8 and go 1.19.3.

    I have tried on an older afero 1.2.2 as well as the current afero 1.9.3 with the same results.

    Workaround

    A workaround is to make sure the fs is created inside the test Run() rather than in the declaration of the test cases. Such as:

    func TestMkdirAll_ok(t *testing.T) {
    	var tests = []struct {
    		path     string
    		createFs func() afero.Fs
    	}{
    		{
    			createFs: func() afero.Fs {
    				fs := afero.NewMemMapFs()
    				fs.MkdirAll("/home/alice", 0755)
    				return fs
    			},
    		},
    	}
    
    	for _, tc := range tests {
    		tc := tc // capture range variable
    		t.Run("sub_test", func(t *testing.T) {
    			_ = tc.createFs()
    		})
    	}
    }
    

    To be honest, I'm not convinced my original code that was trying to share the fs between different goroutines was sensible. If this is not to be fixed, perhaps it would be worth mentioning in the readme that a MemMapFs cannot be passed between goroutines.

  • Add sftpfs files ReadAt method

    Add sftpfs files ReadAt method

    This method is still a TODO after 6 years despite being a simple delegate, i don't think i missed any real reason why it wasn't implemented but i could be wrong.

Related tags
s3fs provides a S3 implementation for Go1.16 filesystem interface.

S3 FileSystem (fs.FS) implementation.Since S3 is a flat structure, s3fs simulates directories by using prefixes and "/" delim. ModTime on directories is always zero value.

Nov 9, 2022
A package to allow one to concurrently go through a filesystem with ease

skywalker Skywalker is a package to allow one to concurrently go through a filesystem with ease. Features Concurrency BlackList filtering WhiteList fi

Nov 14, 2022
An implementation of the FileSystem interface for tar files.

TarFS A wrapper around tar.Reader. Implements the FileSystem interface for tar files. Adds an Open method, that enables reading of file according to i

Sep 26, 2022
Takes an input http.FileSystem (likely at go generate time) and generates Go code that statically implements it.

vfsgen Package vfsgen takes an http.FileSystem (likely at go generate time) and generates Go code that statically implements the provided http.FileSys

Dec 18, 2022
memfs: A simple in-memory io/fs.FS filesystem

memfs: A simple in-memory io/fs.FS filesystem memfs is an in-memory implementation of Go's io/fs.FS interface. The goal is to make it easy and quick t

Jan 8, 2023
A Go io/fs filesystem implementation for reading files in a Github gists.

GistFS GistFS is an io/fs implementation that enables to read files stored in a given Gist. Requirements This module depends on io/fs which is only av

Oct 14, 2022
A Small Virtual Filesystem in Go

This is a virtual filesystem I'm coding to teach myself Go in a fun way. I'm documenting it with a collection of Medium posts that you can find here.

Dec 11, 2022
CRFS: Container Registry Filesystem

CRFS: Container Registry Filesystem Discussion: https://github.com/golang/go/issues/30829 Overview CRFS is a read-only FUSE filesystem that lets you m

Dec 26, 2022
Encrypted overlay filesystem written in Go
Encrypted overlay filesystem written in Go

An encrypted overlay filesystem written in Go. Official website: https://nuetzlich.net/gocryptfs (markdown source). gocryptfs is built on top the exce

Jan 8, 2023
Go filesystem implementations for various URL schemes

hairyhenderson/go-fsimpl This module contains a collection of Go filesystem implementations that can discovered dynamically by URL scheme. All filesys

Dec 28, 2022
A Go filesystem package for working with files and directories

Stowage A Go filesystem package for working with files and directories, it features a simple API with support for the common files and directories ope

May 28, 2021
filesystem for golang

filesystem filesystem for golang installation go get github.com/go-component/filesystem import import "github.com/go-component/filesystem" Usage sup

Nov 1, 2022
A set of io/fs filesystem abstractions and utilities for Go
A set of io/fs filesystem abstractions and utilities for Go

A set of io/fs filesystem abstractions and utilities for Go Please ⭐ this project Overview This package provides io/fs interfaces for: Cloud providers

Nov 19, 2022
Tarserv serves streaming tar files from filesystem snapshots.

tarserv A collection of tools that allow serving large datasets from local filesystem snapshots. It is meant for serving big amounts of data to shell

Jan 11, 2022
Grep archive search in any files on the filesystem, in archive and even inner archive.

grep-archive Grep archive search for string in any files on the filesystem, in archive and even inner archive. Supported archive format are : Tar Form

Jan 26, 2022
Warp across your filesystem in ~5 ms
Warp across your filesystem in ~5 ms

WarpDrive: the Go version. What does this do? Instead of having a huge cd routine to get where you want, with WarpDrive you use short keywords to warp

Dec 14, 2022
Bigfile -- a file transfer system that supports http, rpc and ftp protocol https://bigfile.site
Bigfile -- a file transfer system that supports http, rpc and ftp protocol   https://bigfile.site

Bigfile ———— a file transfer system that supports http, rpc and ftp protocol 简体中文 ∙ English Bigfile is a file transfer system, supports http, ftp and

Dec 31, 2022
File system event notification library on steroids.

notify Filesystem event notification library on steroids. (under active development) Documentation godoc.org/github.com/rjeczalik/notify Installation

Dec 31, 2022
Pluggable, extensible virtual file system for Go

vfs Package vfs provides a pluggable, extensible, and opinionated set of file system functionality for Go across a number of file system types such as

Jan 3, 2023