Documentation
¶
Index ¶
- func GetCreationTime(path string) (time.Time, error)
- func GetOwnerAndGroup(path string) (uid, gid string, err error)
- func HasPermissions(path string, perms os.FileMode) (bool, error)
- func IsLessPermissiveThan(path string, maxPerms os.FileMode) (bool, error)
- func IsMorePermissiveThan(path string, minPerms os.FileMode) (bool, error)
- func IsPathInBase(path, baseDir string) (bool, error)
- func RelStartsWithParent(rel string) bool
- func SanitizePath(path string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOwnerAndGroup ¶ added in v1.0.1
func HasPermissions ¶ added in v1.0.1
HasPermissions checks if a file or directory has at least the specified permissions
func IsLessPermissiveThan ¶ added in v1.0.1
IsLessPermissiveThan checks if a file or directory’s permissions are no more permissive than the given mode
func IsMorePermissiveThan ¶ added in v1.0.1
IsMorePermissiveThan checks if a file or directory’s permissions are at least as permissive as the given mode
func IsPathInBase ¶
IsPathInBase checks if a path is within the base directory
func RelStartsWithParent ¶
RelStartsWithParent checks if a relative path escapes the base directory
func SanitizePath ¶ added in v1.0.1
SanitizePath removes redundant separators and resolves relative components in a path
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.