From fabf1c9334a86d55be133da851cafccc9e6319fe Mon Sep 17 00:00:00 2001 From: William Carroll Date: Wed, 12 Feb 2020 16:58:29 +0000 Subject: Tidy up structure of briefcase I had a spare fifteen minutes and decided that I should tidy up my monorepo. The work of tidying up is not finished; this is a small step in the right direction. TL;DR - Created a tools directory - Created a scratch directory (see README.md for more information) - Added README.md to third_party - Renamed delete_dotfile_symlinks -> symlinkManager - Packaged symlinkManager as an executable symlink-mgr using buildGo --- gopkgs/utils/utils.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gopkgs/utils') diff --git a/gopkgs/utils/utils.go b/gopkgs/utils/utils.go index 53136878dea3..7d662d08668b 100644 --- a/gopkgs/utils/utils.go +++ b/gopkgs/utils/utils.go @@ -21,6 +21,11 @@ func HomeDir() string { return user.HomeDir } +// Returns true if `info` is a symlink. +func IsSymlink(info os.FileMode) bool { + return info&os.ModeSymlink != 0 +} + // Return true if `path` exists and false otherwise. func FileExists(path string) bool { if _, err := os.Stat(path); os.IsNotExist(err) { -- cgit 1.4.1