Documentation ¶
Overview ¶
This package hold common/shared file/path operations used in rcc.
Index ¶
- Variables
- func Abs(path string) (string, error)
- func Age(pathname string) uint64
- func AppendFile(filename string, blob []byte) (err error)
- func CopyFile(source, target string, overwrite bool) error
- func Create(filename string) (*os.File, error)
- func DaysSinceModified(filename string) (int, error)
- func DirWalk(directory string, report Report) error
- func EnsureDirectory(directory string) (string, error)
- func EnsureDirectoryExists(directory string) error
- func EnsureEmptyDirectory(directory string) error
- func EnsureParentDirectory(resource string) (string, error)
- func EnsureSharedDirectory(directory string) (string, error)
- func EnsureSharedParentDirectory(resource string) (string, error)
- func Exists(pathname string) bool
- func FileExist(name string) bool
- func FindNamedPath(basedir, name string) (string, error)
- func ForceNothing(_ os.FileInfo) bool
- func ForceShared()
- func ForceSharedDir(fullpath string) (string, error)
- func ForceTouchWhen(location string, when time.Time)
- func ForceWalk(directory string, force Forced, ignore Ignore, report Report) error
- func Glob(directory string, pattern string) []string
- func HumaneSize(pathname string) string
- func HumaneSizer(rawsize int64) (float64, string)
- func IgnoreDirectories(target os.FileInfo) bool
- func IgnoreNothing(_ os.FileInfo) bool
- func IsDir(pathname string) bool
- func IsEmptyDir(pathname string) bool
- func IsFile(pathname string) bool
- func IsSharedDir(fullpath string) bool
- func LockWaitMessage(lockfile, message string) func()
- func MakeSharedDir(fullpath string) (string, error)
- func MakeSharedFile(fullpath string) (string, error)
- func Md5(filename string) (string, error)
- func Modtime(pathname string) (time.Time, error)
- func NoReporting(string, string, os.FileInfo)
- func NoteDirectoryContent(context, directory string, guide bool)
- func RecursiveGlob(directory string, pattern string) []string
- func RemoveEmptyDirectores(starting string) (err error)
- func RestrictOwnerOnly(filename string) error
- func Sha256(filename string) (string, error)
- func Size(pathname string) (int64, bool)
- func Symlink(pathname string) (string, bool)
- func TempDir() string
- func TouchWhen(location string, when time.Time)
- func TryRemove(context, target string) (err error)
- func TryRemoveAll(context, target string) (err error)
- func TryRename(context, source, target string) (err error)
- func Walk(directory string, ignore Ignore, report Report) error
- func WriteFile(filename string, data []byte, mode os.FileMode) error
- type Copier
- type Forced
- type Ignore
- type IgnoreNewer
- type IgnoreOlder
- type Locked
- type Lockpid
- type Lockpids
- type PathParts
- func (it PathParts) Absolute() PathParts
- func (it PathParts) Append(parts ...string) PathParts
- func (it PathParts) AsEnvironmental(name string) string
- func (it PathParts) Prepend(parts ...string) PathParts
- func (it PathParts) Remove(patterns []string) PathParts
- func (it PathParts) Which(application string, extensions []string) (string, bool)
- type Releaser
- type Report
- type Shared
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Lockless bool
)
Functions ¶
func AppendFile ¶
func DaysSinceModified ¶
func EnsureDirectory ¶
func EnsureDirectoryExists ¶
func EnsureEmptyDirectory ¶
func EnsureParentDirectory ¶
func EnsureSharedDirectory ¶
func FindNamedPath ¶
func ForceNothing ¶
func ForceShared ¶
func ForceShared()
func ForceSharedDir ¶
func ForceTouchWhen ¶
func HumaneSize ¶
func HumaneSizer ¶
func IgnoreDirectories ¶
func IgnoreNothing ¶
func IsEmptyDir ¶
func IsSharedDir ¶
func LockWaitMessage ¶
func LockWaitMessage(lockfile, message string) func()
func MakeSharedDir ¶
func MakeSharedFile ¶
func NoteDirectoryContent ¶
func RecursiveGlob ¶
func RemoveEmptyDirectores ¶
func RestrictOwnerOnly ¶
func TryRemoveAll ¶
Types ¶
type Forced ¶
func ForceFilename ¶
type IgnoreNewer ¶
type IgnoreOlder ¶
type Lockpid ¶
type Lockpid struct { ParentID int ProcessID int Controller string Space string Username string Basename string }
func LockpidFor ¶
type PathParts ¶
type PathParts []string
func EnvironmentPath ¶
func TargetPath ¶
func TargetPath() PathParts
func (PathParts) AsEnvironmental ¶
Click to show internal directories.
Click to hide internal directories.