Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFile ¶
CreateFile creates a new file at newpath, returning an error if newpath already exists
func CreateFileWithReplacement ¶
CreateFileWithReplacement will create a new file at any path, removing the contents of the old file
func RenameFile ¶
RenameFile renames oldpath to newpath, returning an error if newpath already exists. If this function returns successfully, the contents of newpath will be identical to oldpath, and oldpath will be removed.
func RenameFileWithReplacement ¶
RenameFileWithReplacement will replace any existing file at newpath with the contents of oldpath.
If no file already exists at newpath, newpath will be created using the contents of oldpath. If this function returns successfully, the contents of newpath will be identical to oldpath, and oldpath will be removed.
Types ¶
type DiskStatus ¶
DiskStatus is returned by DiskUsage
func DiskUsage ¶
func DiskUsage(path string) (*DiskStatus, error)
DiskUsage returns disk usage of disk of path
type FileExistsError ¶
type FileExistsError struct {
// contains filtered or unexported fields
}
A FileExistsError is returned when an operation cannot be completed due to a file already existing.
func (FileExistsError) Error ¶
func (e FileExistsError) Error() string