diff options
author | Jakob Unterwurzacher | 2015-11-14 21:25:10 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2015-11-14 21:25:10 +0100 |
commit | 58592330dc33e194e55fa942d3f375124839f058 (patch) | |
tree | 7b523afe12b7382556ca591768e05ed397b0512f /checkdir.go | |
parent | 6736212b29bd54a0ed9778f1bbea49db03f43c06 (diff) |
Refactor cli argument handling
Also, add the "-config" option for storing gocryptfs.conf
outside of CIPHERDIR.
Diffstat (limited to 'checkdir.go')
-rw-r--r-- | checkdir.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/checkdir.go b/checkdir.go index 9614d7d..6f7f75d 100644 --- a/checkdir.go +++ b/checkdir.go @@ -6,6 +6,7 @@ import ( "os" ) +// checkDirEmpty - check if "dir" exists and is an empty directory func checkDirEmpty(dir string) error { err := checkDir(dir) if err != nil { @@ -21,6 +22,7 @@ func checkDirEmpty(dir string) error { return fmt.Errorf("directory %s not empty", dir) } +// checkDir - check if "dir" exists and is a directory func checkDir(dir string) error { fi, err := os.Stat(dir) if err != nil { |