Documentation ¶
Index ¶
- Constants
- Variables
- func PathExists(d string) bool
- type Extractor
- type FakerootOps
- type File
- func (f *File) Close() error
- func (f *File) Fd() uintptr
- func (f *File) Lstat() (FileInfo, error)
- func (f *File) Name() string
- func (f *File) Read(b []byte) (int, error)
- func (f *File) Readdir(n int) ([]os.FileInfo, error)
- func (f *File) Readdirnames(n int) ([]string, error)
- func (f *File) Seek(offset int64, whence int) (ret int64, err error)
- func (f *File) Size() int64
- func (f *File) Stat() (FileInfo, error)
- func (f *File) Sync() error
- type FileInfo
- type FsOps
- type GoFsOps
- type Logger
- type PrintfLogger
- type SquashFs
- func (s *SquashFs) BytesUsed() uint64
- func (s *SquashFs) Close()
- func (s *SquashFs) Free()
- func (s *SquashFs) Lstat(name string) (FileInfo, error)
- func (s *SquashFs) OpenFile(name string) (*File, error)
- func (s *SquashFs) Stat(name string) (FileInfo, error)
- func (s *SquashFs) Walk(root string, walkFn WalkFunc) error
- type WalkFunc
Constants ¶
const DefaultDirPerm = 0755
DefaultDirPerm - Directories created with this perm
const DefaultFilePerm = 0644
DefaultFilePerm - files will be created with this perm by default.
const OpenDirPerm = 0777
OpenDirPerm - Perm that current uid can write to
Variables ¶
var ErrNotImplemented = errors.New("not implemented")
ErrNotImplemented - not implemented
var SkipDir = filepath.SkipDir
SkipDir - Just re-used from filepath
Functions ¶
func PathExists ¶
Types ¶
type Extractor ¶
type FakerootOps ¶
type FakerootOps struct{}
Golang's os.Chown, os.Chmod, syscall.Mknod, make syscalls which are missed by fakeroot's LD_PRELOAD of those filesystem operations. In order to work with fakeroot, we execute the programs 'chown', 'chmod', 'mknod' which are expected to work with fakeroot.
type File ¶
type File struct { Filename string SquashFs *SquashFs Pos int64 // contains filtered or unexported fields }
File - a os.File for squash
func (*File) Lstat ¶
Lstat - os.File.Lstat - if file is a symlink info is about the link not the target.
func (*File) Readdirnames ¶
Readdirnames - os.File.Readdirnames
type FileInfo ¶
type FileInfo struct { Filename string FSize int64 FMode os.FileMode FModTime time.Time File *File SymlinkTarget string }
FileInfo - Implements a os.FileInfo interface for squash file.
type Logger ¶
type Logger interface { Info(string, ...interface{}) Verbose(string, ...interface{}) Debug(string, ...interface{}) }
Logger - basic logging interface
type PrintfLogger ¶
type PrintfLogger struct {
Verbosity int
}
PrintfLogger - logger that calls Fprintf(os.Stderr, ...)
func (PrintfLogger) Debug ¶
func (p PrintfLogger) Debug(fmt string, a ...interface{})
func (PrintfLogger) Info ¶
func (p PrintfLogger) Info(fmt string, a ...interface{})
func (PrintfLogger) Verbose ¶
func (p PrintfLogger) Verbose(fmt string, a ...interface{})