package
6.26.0
Repository: https://github.com/c2fo/vfs.git
Documentation: pkg.go.dev

# Functions

EncodeAuthority takes an unencoded URI authority string and encodes it.
EncodeURI ensure that a uri is properly percent-encoded.
EncodeUserInfo takes an unencoded URI authority userinfo string and encodes it.
EnsureLeadingSlash is like EnsureTrailingSlash except that it adds the leading slash if needed.
EnsureTrailingSlash is like AddTrailingSlash but will only ever use / since it's use for web uri's, never a Windows OS path.
GetFileURI returns a File URI.
GetLocationURI returns a Location URI.
NewAuthority initializes Authority struct by parsing authority string.
PathToURI takes a relative or absolute path and returns an OS URI.
Ptr returns a pointer to the given value.
RemoveLeadingSlash removes leading slash, if any.
RemoveTrailingSlash removes trailing slash, if any.
SeekTo is a helper function for Seek.
TouchCopy is a wrapper around io.Copy which ensures that even empty source files (reader) will get written as an empty file.
TouchCopyBuffered is a wrapper around io.CopyBuffer which ensures that even empty source files (reader) will get written as an empty file.
UpdateLastModifiedByMoving is used by some backends' Touch() method when a file already exists.
ValidateAbsoluteFilePath ensures that a file path has a leading slash but not a trailing slash.
ValidateAbsoluteLocationPath ensure that a file path has both leading and trailing slashes.
ValidatePrefix ensures that a prefix path has neither leading nor trailing slashes may not be empty but unlike relative file path, *may* be simply ".".
ValidateRelativeFilePath ensures that a file path has neither leading nor trailing slashes.
ValidateRelativeLocationPath ensure that a file path has no leading slash but has a trailing slash.
WrapCloseError returns a wrapped close error.
WrapReadError returns a wrapped read error.
WrapSeekError returns a wrapped seek error.
WrapWriteError returns a wrapped write error.

# Constants

ErrBadAbsFilePath constant is returned when a file path is not absolute.
ErrBadAbsLocationPath constant is returned when a file path is not absolute.
ErrBadPrefix constant is returned when a prefix is not relative or ends in / or is empty.
ErrBadRelFilePath constant is returned when a file path is not relative.
ErrBadRelLocationPath constant is returned when a file path is not relative.
TouchCopyMinBufferSize min buffer size used in TouchCopyBuffered in bytes.

# Structs

Authority represents host, port and userinfo (user/pass) in a URI.
UserInfo represents user/pass portion of a URI.