Documentation
¶
Index ¶
- Variables
- func AppendYearLocal(noYearPath string) (string, error)
- func CleanupOld(prefix, rmDir string, retentionDays int) error
- func DefaultRmDir() string
- func FoldersHandler(c *gin.Context)
- func ListFolders() ([]string, error)
- func Logf(format string, v ...interface{})
- func RenameAndUpload(path, prefix, rmDir string) (string, error)
- func RenameLocal(path, prefix string) (string, error)
- func RenameLocalNoYear(src, prefix string) (string, error)
- func SanitizePrefix(p string) (string, error)
- func SimpleUpload(path, rmDir string) (string, error)
- func StartFolderCache()
Constants ¶
This section is empty.
Variables ¶
var ExecCommand = exec.Command
ExecCommand is exec.Command by default, but can be overridden in tests.
Functions ¶
func AppendYearLocal ¶
func CleanupOld ¶
func DefaultRmDir ¶
func DefaultRmDir() string
func FoldersHandler ¶ added in v1.0.0
FoldersHandler writes a JSON {"folders": ["/path", ...]}.
func ListFolders ¶ added in v1.0.0
ListFolders returns a slice of all folder paths on the reMarkable device. Paths are returned with a leading slash, e.g. "/Books/Fiction".
func RenameAndUpload ¶
/ RenameAndUpload renames locally, uploads via rmapi, and returns the name on the device.
func RenameLocal ¶
func RenameLocalNoYear ¶
func SanitizePrefix ¶ added in v1.0.0
SanitizePrefix ensures prefix is a simple directory name with no path separators, leading slashes, or parent directory components.
func SimpleUpload ¶
SimpleUpload calls `rmapi put` and returns the uploaded filename or a detailed error.
func StartFolderCache ¶ added in v1.1.0
func StartFolderCache()
StartFolderCache begins a goroutine that periodically refreshes the cached folder listing. It also performs an initial refresh so the first user request can be served quickly.
Types ¶
This section is empty.