vfs

package
v0.4.16-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: ISC Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const VERSION string = "0.0.1"

Variables

This section is empty.

Functions

This section is empty.

Types

type ChildEntry

type ChildEntry struct {
	Name string
	Node *FilesystemNode
}

type FileInfo

type FileInfo struct {
	Lname    string      `json:"Name" msgpack:"Name"`
	Lsize    int64       `json:"Size" msgpack:"Size"`
	Lmode    os.FileMode `json:"Mode" msgpack:"Mode"`
	LmodTime time.Time   `json:"ModTime" msgpack:"ModTime"`
	Ldev     uint64      `json:"Dev" msgpack:"Dev"`
	Lino     uint64      `json:"Ino" msgpack:"Ino"`
	Luid     uint64      `json:"Uid" msgpack:"Uid"`
	Lgid     uint64      `json:"Gid" msgpack:"Gid"`
}

func FileInfoFromStat

func FileInfoFromStat(stat os.FileInfo) FileInfo

func NewFileInfo

func NewFileInfo(name string, size int64, mode os.FileMode, modTime time.Time, dev uint64, ino uint64, uid uint64, gid uint64) FileInfo

func (FileInfo) Dev

func (f FileInfo) Dev() uint64

func (FileInfo) Gid

func (f FileInfo) Gid() uint64

func (*FileInfo) HumanSize

func (fileinfo *FileInfo) HumanSize() string

func (FileInfo) Ino

func (f FileInfo) Ino() uint64

func (FileInfo) IsDir

func (f FileInfo) IsDir() bool

func (FileInfo) ModTime

func (f FileInfo) ModTime() time.Time

func (FileInfo) Mode

func (f FileInfo) Mode() os.FileMode

func (FileInfo) Name

func (f FileInfo) Name() string

func (FileInfo) Size

func (f FileInfo) Size() int64

func (FileInfo) Sys

func (f FileInfo) Sys() any

func (FileInfo) Uid

func (f FileInfo) Uid() uint64

type Filesystem

type Filesystem struct {
	Root *FilesystemNode

	Symlinks []SymlinkEntry
	// contains filtered or unexported fields
}

func NewFilesystem

func NewFilesystem() *Filesystem

func NewFilesystemFromBytes

func NewFilesystemFromBytes(serialized []byte) (*Filesystem, error)

func NewFilesystemFromScan

func NewFilesystemFromScan(repository string, directory string) (*Filesystem, error)

func (*Filesystem) ImporterBegin

func (filesystem *Filesystem) ImporterBegin(location string) error

func (*Filesystem) ImporterEnd

func (filesystem *Filesystem) ImporterEnd() error

func (*Filesystem) ImporterOpen

func (filesystem *Filesystem) ImporterOpen(filename string) (io.ReadCloser, error)

func (*Filesystem) ListDirectories

func (filesystem *Filesystem) ListDirectories() []string

func (*Filesystem) ListFiles

func (filesystem *Filesystem) ListFiles() []string

func (*Filesystem) ListNonRegular

func (filesystem *Filesystem) ListNonRegular() []string

func (*Filesystem) ListStat

func (filesystem *Filesystem) ListStat() []string

func (*Filesystem) Lookup

func (filesystem *Filesystem) Lookup(pathname string) (*FilesystemNode, error)

func (*Filesystem) LookupChildren

func (filesystem *Filesystem) LookupChildren(pathname string) ([]string, error)

func (*Filesystem) LookupInode

func (filesystem *Filesystem) LookupInode(pathname string) (*FileInfo, bool)

func (*Filesystem) LookupInodeForDirectory

func (filesystem *Filesystem) LookupInodeForDirectory(pathname string) (*FileInfo, bool)

func (*Filesystem) LookupInodeForFile

func (filesystem *Filesystem) LookupInodeForFile(pathname string) (*FileInfo, bool)

func (*Filesystem) NDirectories

func (filesystem *Filesystem) NDirectories() uint64

func (*Filesystem) NFiles

func (filesystem *Filesystem) NFiles() uint64

func (*Filesystem) Scan

func (filesystem *Filesystem) Scan(c chan<- int64, directory string, skip []string) error

func (*Filesystem) Serialize

func (filesystem *Filesystem) Serialize() ([]byte, error)

func (*Filesystem) Size

func (filesystem *Filesystem) Size() uint64

type FilesystemNode

type FilesystemNode struct {
	Inode    FileInfo
	Children []ChildEntry
	// contains filtered or unexported fields
}

type SymlinkEntry

type SymlinkEntry struct {
	Origin string
	Target string
}

Directories

Path Synopsis
fs
s3

Jump to

Keyboard shortcuts

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