mfmodfileutil

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2020 License: MIT Imports: 2 Imported by: 0

README

MFMODFILEUTIL

Simple file utilities. I wrote these as I was tired of typing the same code into my projects just to check if a directory or file exists.

v1.0.0

func DirectoryExists(adirpath string) (bool, error)

Returns true if the directory exists, false if it does not. Returns an error if an unexpected error is encountered.

func RegularfileExists(afilepath string) (bool, error)

Returns true if the file exists, and is a regular file (i.e. not a symlink or such). Otherwise returns false. Returns an error if an unexpected error is encountered.

v1.1.0

func RemoveDirectoryWithContents(adirpath string) error

Recursively removes all files and directories under adirpath.

TODO

Specialfileexists

Exists

???

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirectoryExists

func DirectoryExists(adirpath string) (bool, error)

func RegularfileExists

func RegularfileExists(afilepath string) (bool, error)

func RemoveDirectoryWithContents added in v1.1.0

func RemoveDirectoryWithContents(adirpath string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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