fs

package
v0.0.0-...-7bde1eb Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FidPath

func FidPath(mnt RootDir, f *lustre.Fid) string

FidPath returns the open-by-fid path for a fid.

func FidRelativePath

func FidRelativePath(f *lustre.Fid) string

FidRelativePath returns the relattive open-by-fid path for a fid.

func LookupFid

func LookupFid(path string) (*lustre.Fid, error)

LookupFid returns the Fid for the given file or an error.

func LstatFid

func LstatFid(mnt RootDir, f *lustre.Fid) (os.FileInfo, error)

LstatFid returns an os.FileInfo given a mountpoint and fid

func OpenByFid

func OpenByFid(mnt RootDir, f *lustre.Fid) (*os.File, error)

OpenByFid returns an open file handle given a mountpoint and fid

func OpenFileByFid

func OpenFileByFid(mnt RootDir, f *lustre.Fid, flags int, perm os.FileMode) (*os.File, error)

OpenFileByFid returns an open file handle given a mountpoint and fid

func StatFid

func StatFid(mnt RootDir, f *lustre.Fid) (os.FileInfo, error)

StatFid returns an os.FileInfo given a mountpoint and fid

func Version

func Version() (string, error)

Version returns the current Lustre version string.

Types

type ID

type ID RootDir

ID should be a unique identifier for a filesystem. For now just use RootDir

func GetID

func GetID(p string) (ID, error)

GetID returns the filesystem's ID. For the moment, this is the root path, but in the future it could be something more globally unique (uuid?).

func TestID

func TestID(name string) ID

TestID returns an ID value suitable for testing without an actual lustre filesystem.

func (ID) Path

func (id ID) Path() (string, error)

Path returns the path for the root

func (ID) Root

func (id ID) Root() (RootDir, error)

Root returns the root dir for the root

func (ID) String

func (id ID) String() string

type RootDir

type RootDir struct {
	// contains filtered or unexported fields
}

RootDir represent a the mount point of a Lustre filesystem.

func MountRelPath

func MountRelPath(pathname string) (RootDir, string, error)

MountRelPath returns the lustre mountpoint, and remaing path for the given pathname. The remaining path is relative to the mount point. Returns an error if pathname is not valid or does not refer to a Lustre fs.

func MountRoot

func MountRoot(path string) (RootDir, error)

MountRoot returns the Lustre filesystem mountpoint for path or returns an error if the path is not on a Lustre filesystem.

func (RootDir) IsValid

func (root RootDir) IsValid() bool

IsValid indicates whether or not the RootDir is actually the root of a Lustre filesystem.

func (RootDir) Join

func (root RootDir) Join(args ...string) string

Join args with root dir to create an absolute path. FIXME: replace this with OpenAt and friends

func (RootDir) Open

func (root RootDir) Open() (*os.File, error)

Open returns open handle for the root directory

func (RootDir) Path

func (root RootDir) Path() string

Path returns the path for the root

func (RootDir) String

func (root RootDir) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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