layout

package
v3.0.2-rc2+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2018 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	DirMode  os.FileMode
	FileMode os.FileMode
	// contains filtered or unexported fields
}

Manager manages a filesystem layout in a given path

func (*Manager) AddDir

func (m *Manager) AddDir(path string) error

AddDir adds a directory in layout, will recursively add parent directories if they don't exist

func (*Manager) AddFile

func (m *Manager) AddFile(path string, content []byte) error

AddFile adds a file in layout, will recursively add parent directories if they don't exist

func (m *Manager) AddSymlink(path string, target string) error

AddSymlink adds a symlink in layout, will recursively add parent directories if they don't exist

func (*Manager) Chmod

func (m *Manager) Chmod(path string, mode os.FileMode) error

Chmod sets permission mode for path

func (*Manager) Chown

func (m *Manager) Chown(path string, uid, gid int) error

Chown sets ownership for path

func (*Manager) Create

func (m *Manager) Create() error

Create creates the filesystem layout

func (*Manager) GetPath

func (m *Manager) GetPath(path string) (string, error)

GetPath returns the full path of layout path

func (*Manager) SetRootPath

func (m *Manager) SetRootPath(path string) error

SetRootPath sets layout root path

func (*Manager) Update

func (m *Manager) Update() error

Update updates the filesystem layout

type Session

type Session struct {
	*Manager
	Layer layer
}

Session directory layout manager

func NewSession

func NewSession(path string, fstype string, size int, system *mount.System, layer layer) (*Session, error)

NewSession creates and returns a session directory layout manager

func (*Session) FinalPath

func (s *Session) FinalPath() string

FinalPath returns the full path to session final directory

func (*Session) Path

func (s *Session) Path() string

Path returns the full path of session directory

func (*Session) RootFsPath

func (s *Session) RootFsPath() string

RootFsPath returns the full path to session rootfs directory

Directories

Path Synopsis
layer

Jump to

Keyboard shortcuts

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