Documentation ¶
Index ¶
- func FilePathToURI(path, relativeTo string) (string, error)
- func FilterReservedNames(p string) string
- func IsDir(p string) (bool, error)
- func IsURI(ref string) bool
- func URIToFilePath(uri string) (string, error)
- func WindowsBasename(p string) string
- func WindowsDir(p string) string
- func WindowsPathSID(uid, gid int) string
- func WindowsToSlash(p string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilePathToURI ¶
FilePathToURI converts a filepath to URI. If relativeTo is provided not empty and path is a relative path it will be made absolute based on the provided value. Otherwise, the current working directory is used.
func FilterReservedNames ¶
func URIToFilePath ¶
examples:
- unix file: file://laptop/some%20dir/file.tgz
- windows drive: file:///C:/Documents%20and%20Settings/file.tgz
- windows share: file://laptop/My%20Documents/file.tgz
func WindowsBasename ¶
WindowsBasename is equivalent to path.Basename or filepath.Basename but always for Windows paths reproduced because Windows implementation is not exported
func WindowsDir ¶
WindowsDir is equivalent to path.Dir or filepath.Dir but always for Windows paths reproduced because Windows implementation is not exported
func WindowsPathSID ¶
WindowsPathSID returns the appropriate SID for a given UID and GID This the basic logic for path permissions in Pack and Lifecycle
func WindowsToSlash ¶
WindowsToSlash is equivalent to path.ToSlash or filepath.ToSlash but always for Windows paths reproduced because Windows implementation is not exported
Types ¶
This section is empty.