internal

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2023 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EscapeUrl

func EscapeUrl(path string) string

EscapeUrl escapes the path according to the FreeDesktop Trash specification. Which basically just refers to "RFC 2396, section 2".

func FileExists

func FileExists(path string) (bool, error)

FileExists omits the parts to make this usable cross-platform and therefore saves a minimal amount of CPU cycles and some allocations.

func Mounts

func Mounts() ([]string, error)

Mounts reads /proc/mounts and returns all mounts found, excluding everything on the devices sysfs, rootfs, cgroup and /dev/ paths.

func RemoveAllIfExists

func RemoveAllIfExists(path string) error

RemoveAllIfExists tries to remove the given path. The path can either be a directory or a file. This function catches certain errors, so you don't have to.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL