Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrLocked = errors.New("file already locked")
)
Functions ¶
func IsDirWriteable ¶
IsDirWriteable checks if dir is writable by writing and removing a file to dir. It returns nil if dir is writable.
func Preallocate ¶ added in v2.2.0
Preallocate tries to allocate the space for given file. This operation is only supported on linux by a few filesystems (btrfs, ext4, etc.). If the operation is unsupported, no error will be returned. Otherwise, the error encountered will be returned.
func TouchDirAll ¶ added in v2.2.3
TouchDirAll is simliar to os.MkdirAll. It creates directories with 0700 permission if any directory does not exists. TouchDirAll also ensures the given directory is writable.
Types ¶
Click to show internal directories.
Click to hide internal directories.