oslayer

package
v5.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCannotDetermineRoot   = errors.New("cannot determine project root")
	ErrPathEmpty             = errors.New("path is empty")
	ErrPathAbsolute          = errors.New("path is absolute")
	ErrPathContainsBackslash = errors.New("path contains backslash")
	ErrDirectoryTraversal    = errors.New("path contains directory traversal")
	ErrResolvesOutsideRoot   = errors.New("path resolves outside project root")

	ErrDirectoryNotFound = errors.New("directory not found")
	ErrWalkError         = errors.New("error walking directory")

	ErrFileUnreadable        = errors.New("file unreadable")
	ErrCannotCreateDirectory = errors.New("cannot create directory")
	ErrCannotOpenFile        = errors.New("cannot open file")
	ErrInvalidMode           = errors.New("invalid file mode")
	ErrLockTimeout           = errors.New("lock timeout")
	ErrLockFailed            = errors.New("lock failed")
	ErrFileIO                = errors.New("file I/O error")
	ErrEndOfFile             = errors.New("end of file")
	ErrWrongMode             = errors.New("wrong file mode for this operation")
	ErrCannotWriteFile       = errors.New("cannot write file")
	ErrCannotRename          = errors.New("cannot rename file")
	ErrCannotDelete          = errors.New("cannot delete file")
	ErrSymlinkNotAllowed     = errors.New("symlinks are not allowed in the spec tree")
)

Functions

func DeleteFile

func DeleteFile(cfsPath CfsPath) error

func RenameFile

func RenameFile(source, destination CfsPath) error

func ValidateStringIsCfsPath

func ValidateStringIsCfsPath(value string) error

Types

type CfsPath

type CfsPath string

func ListAllFiles

func ListAllFiles(cfsPath CfsPath) ([]CfsPath, error)

func OsPathToCfs

func OsPathToCfs(osPath OsPath) (CfsPath, error)

type File

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

func OpenFile

func OpenFile(cfsPath CfsPath, mode string, timeoutMs int) (*File, error)

func (*File) Close

func (f *File) Close()

func (*File) ReadLine

func (f *File) ReadLine() (string, error)

func (*File) SkipLines

func (f *File) SkipLines(count int) error

func (*File) Write

func (f *File) Write(content string) error

type OsPath

type OsPath string

func CfsPathToOs

func CfsPathToOs(cfsPath CfsPath) (OsPath, error)

func GetProjectRoot

func GetProjectRoot() (OsPath, error)

Jump to

Keyboard shortcuts

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