afero
afero copied to clipboard
A FileSystem Abstraction System for Go
It's possible to use the memmap fs to create a file, chmod it to 0, and then open it without a problem. When using memmap to simulate a filesystem in...
How to reproduce: ```go package main import ( "log" "github.com/spf13/afero" ) func main() { folderName := "secret" fsys := afero.NewMemMapFs() fsys.Mkdir(folderName, 0700) afero.WriteFile(fsys, "secret/filename", []byte(""), 0700) _, err := fsys.Stat("secret/filename")...
This is an update to https://github.com/spf13/afero/pull/239 to address the open comments, and rebased off master
On `RegexpFs`, some operations apply given regexps with not file **name** but file **path**. Fix this. README > A filtered view on file *names*, any file NOT matching the passed...
The memory mapped FS differs in behaviour when renaming a file compared with the OsFs one. Essentially in a memory mapped filesystem the `Rename()` operation takes effect on any existing...
After the deprecations of ioutil most of the new functions has been migrated to the os package. This patch includes all the new functions. Signed-off-by: Morten Linderud
On windows long relative paths led to an error (see https://github.com/golang/go/issues/21782). Here is a code example that fails (only on windows, on play it works): https://play.golang.org/p/wMS5gti4SD To reproduce it you...
Lib Version: 1.6.0 Go Version: 1.17 The problem seems to be caused here. The function `filepath.clean` will return a dot if empty. The call on the next line will not...
@bep Can you confirm that I have updated the lstat tests correctly?