nilfs

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2025 License: MIT Imports: 5 Imported by: 0

README

nilfs - Abstract File System interface

Go Reference Go Report Card CI License

The nilfs package implements the absfs.FileSystem interface. This implementation does nothing and returns no errors. Useful as a template for new filesystems, or where a noop FileSystem might be needed to to satisfy an argument list.

Install

$ go get github.com/absfs/nilfs

absfs

Check out the absfs repo for more information about the abstract filesystem interface and features like filesystem composition.

LICENSE

This project is governed by the MIT License. See LICENSE

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct{}

func (File) Close

func (File) Close() error

func (File) Name

func (File) Name() string

func (File) Read

func (File) Read(p []byte) (int, error)

func (File) ReadAt

func (File) ReadAt(b []byte, off int64) (n int, err error)

func (File) ReadDir

func (File) ReadDir(n int) ([]fs.DirEntry, error)

func (File) Readdir

func (File) Readdir(n int) ([]os.FileInfo, error)

func (File) Readdirnames

func (File) Readdirnames(n int) ([]string, error)

func (File) Seek

func (File) Seek(offset int64, whence int) (ret int64, err error)

func (File) Stat

func (File) Stat() (os.FileInfo, error)

func (File) Sync

func (File) Sync() error

func (File) Truncate

func (File) Truncate(size int64) error

func (File) Write

func (File) Write(p []byte) (int, error)

func (File) WriteAt

func (File) WriteAt(b []byte, off int64) (n int, err error)

func (File) WriteString

func (File) WriteString(s string) (n int, err error)

type FileSystem

type FileSystem struct{}

func NewFs

func NewFs() (*FileSystem, error)

func (*FileSystem) Chdir

func (*FileSystem) Chdir(name string) error

func (*FileSystem) Chmod

func (*FileSystem) Chmod(name string, mode os.FileMode) error

Chmod changes the mode of the named file to mode.

func (*FileSystem) Chown

func (*FileSystem) Chown(name string, uid, gid int) error

Chown changes the owner and group ids of the named file

func (*FileSystem) Chtimes

func (*FileSystem) Chtimes(name string, atime time.Time, mtime time.Time) error

Chtimes changes the access and modification times of the named file

func (*FileSystem) Create

func (*FileSystem) Create(name string) (absfs.File, error)

func (*FileSystem) Getwd

func (*FileSystem) Getwd() (dir string, err error)

func (*FileSystem) Lchown

func (*FileSystem) Lchown(name string, uid, gid int) error

func (*FileSystem) Lstat

func (*FileSystem) Lstat(name string) (os.FileInfo, error)

func (*FileSystem) Mkdir

func (*FileSystem) Mkdir(name string, perm os.FileMode) error

func (*FileSystem) MkdirAll

func (*FileSystem) MkdirAll(name string, perm os.FileMode) error

func (*FileSystem) Open

func (*FileSystem) Open(name string) (absfs.File, error)

func (*FileSystem) OpenFile

func (*FileSystem) OpenFile(name string, flag int, perm os.FileMode) (absfs.File, error)

func (*FileSystem) ReadDir

func (*FileSystem) ReadDir(name string) ([]fs.DirEntry, error)

func (*FileSystem) ReadFile

func (*FileSystem) ReadFile(name string) ([]byte, error)
func (*FileSystem) Readlink(name string) (string, error)

func (*FileSystem) Remove

func (*FileSystem) Remove(name string) error

func (*FileSystem) RemoveAll

func (*FileSystem) RemoveAll(name string) error

func (*FileSystem) Rename

func (*FileSystem) Rename(oldpath, newpath string) error

func (*FileSystem) Stat

func (*FileSystem) Stat(name string) (os.FileInfo, error)

func (*FileSystem) Sub

func (f *FileSystem) Sub(dir string) (fs.FS, error)
func (*FileSystem) Symlink(oldname, newname string) error

func (*FileSystem) TempDir

func (*FileSystem) TempDir() string

func (*FileSystem) Truncate

func (*FileSystem) Truncate(name string, size int64) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL