Documentation
¶
Overview ¶
Package ctlsocksrv implements the control socket interface that can be activated by passing "-ctlsock" on the command line.
Index ¶
Constants ¶
View Source
const ReadBufSize = 5000
ReadBufSize is the size of the request read buffer. The longest possible path is 4096 bytes on Linux and 1024 on Mac OS X so 5000 bytes should be enough to hold the whole JSON request. This assumes that the path does not contain too many characters that had to be be escaped in JSON (for example, a null byte blows up to "\u0000"). We abort the connection if the request is bigger than this.
Variables ¶
This section is empty.
Functions ¶
func SanitizePath ¶
SanitizePath adapts filepath.Clean for FUSE paths.
- Leading slash(es) are dropped
- It returns "" instead of "."
- If the cleaned path points above CWD (start with ".."), an empty string is returned
See the TestSanitizePath testcases for examples.
Types ¶
Click to show internal directories.
Click to hide internal directories.