Documentation ¶
Overview ¶
Package pathconv provides path converter between client and server.
TODO: Do we want to introduce ClientPath and ServerPath type so that we won't be confused the path is client path or server path?
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PathConverter ¶
type PathConverter interface { // ToClientPath converts a server path to a client path. ToClientPath(string) (string, error) // ToServerPath converts an absolute client path to a server path. ToServerPath(string) (string, error) // IsAbsClient reports whether the path is absolute as client path. IsAbsClient(string) bool // JoinClient joins any number of path elements into a single path. JoinClient(elem ...string) string // IsSafeClient reports whether the path is safe absolute path // (not go out from root directory). // It returns false for relative path. IsSafeClient(string) bool }
PathConverter provides path conversion between a client path and a server path. It also provides client path utilities.
func Default ¶
func Default() PathConverter
Default returns a path converter for the case server and client are both same posix path namesystem.
Click to show internal directories.
Click to hide internal directories.