Documentation ¶
Index ¶
- func CheckDir(dirPath string) error
- func CheckDirErrPath(dirPath string, errMsgPath string) error
- func CheckFile(path string) error
- func CheckFileErrPath(path string, errMsgPath string) error
- func CloseSilent(closer io.Closer, closers ...io.Closer)
- func CreateDir(path string) error
- func CreateDirIfMissing(path string) (bool, error)
- func CreateFile(path string) error
- func DeleteDir(path string) error
- func DeleteDirIfPresent(path string) (bool, error)
- func DirPathRelativeToCWD(absPath string) string
- func DirPaths(paths []string, addTrailingSlash bool) []string
- func ErrorCreateDir(path string) error
- func ErrorCreateFile(path string) error
- func ErrorDeleteDir(path string) error
- func ErrorDirDoesNotExist(path string) error
- func ErrorFileAlreadyExists(path string) error
- func ErrorFileDoesNotExist(path string) error
- func ErrorNotADir(path string) error
- func ErrorNotAFile(path string) error
- func ErrorReadDir(path string) error
- func ErrorReadFile(path string) error
- func ErrorReadFormFile(fileName string) error
- func ErrorUnexpected() error
- func EscapeTilde(path string) (string, error)
- func FileTree(paths []string, cwd string, dirsOrder DirsOrder) string
- func IgnoreCortexDebug(path string, fi os.FileInfo) (bool, error)
- func IgnoreCortexYAML(path string, fi os.FileInfo) (bool, error)
- func IgnoreHiddenFiles(path string, fi os.FileInfo) (bool, error)
- func IgnoreHiddenFolders(path string, fi os.FileInfo) (bool, error)
- func IgnoreNonPython(path string, fi os.FileInfo) (bool, error)
- func IgnoreNonYAML(path string, fi os.FileInfo) (bool, error)
- func IgnorePythonGeneratedFiles(path string, fi os.FileInfo) (bool, error)
- func IsDir(path string) bool
- func IsFile(path string) bool
- func IsFileOrDir(path string) bool
- func IsFilePathPython(path string) bool
- func IsFilePathYAML(path string) bool
- func ListDir(dir string, relative bool) ([]string, error)
- func ListDirRecursive(dir string, relative bool, ignoreFns ...IgnoreFn) ([]string, error)
- func MakeEmptyFile(path string) error
- func MakeEmptyFiles(path string, paths ...string) error
- func MakeEmptyFilesInDir(dir string, path string, paths ...string) error
- func Open(path string) (*os.File, error)
- func OpenFile(path string, flag int, perm os.FileMode) (*os.File, error)
- func OpenNewFile(path string) (*os.File, error)
- func ParentDir(dir string) string
- func PathRelativeToCWD(absPath string) string
- func ReadFile(path string) (string, error)
- func ReadFileBytes(path string) ([]byte, error)
- func ReadFileBytesErrPath(path string, errMsgPath string) ([]byte, error)
- func ReadReqFile(r *http.Request, fileName string) ([]byte, error)
- func RelToAbsPath(relativePath string, baseDir string) string
- func SearchForFile(filename string, dir string) (string, error)
- func SortFilePaths(paths []string, dirsOrder DirsOrder) []string
- func TmpDir() (string, error)
- func TrimDirPrefix(fullPath string, dirPath string) string
- func UserRelToAbsPath(relativePath string) string
- func WriteFile(data []byte, path string) error
- type DirsOrder
- type Error
- type ErrorKind
- type IgnoreFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDirErrPath ¶ added in v0.10.0
CheckDir returns nil if the path is a directory
func CheckFileErrPath ¶ added in v0.10.0
CheckFile returns nil if the path is a file
func CreateDirIfMissing ¶
func CreateFile ¶ added in v0.4.0
func DeleteDirIfPresent ¶ added in v0.14.0
func DirPathRelativeToCWD ¶ added in v0.13.0
func ErrorCreateDir ¶ added in v0.4.0
func ErrorCreateFile ¶ added in v0.4.0
func ErrorDeleteDir ¶ added in v0.14.0
func ErrorDirDoesNotExist ¶ added in v0.4.0
func ErrorFileAlreadyExists ¶ added in v0.4.0
func ErrorFileDoesNotExist ¶ added in v0.4.0
func ErrorNotADir ¶ added in v0.4.0
func ErrorNotAFile ¶ added in v0.4.0
func ErrorReadDir ¶ added in v0.4.0
func ErrorReadFile ¶ added in v0.4.0
func ErrorReadFormFile ¶ added in v0.4.0
func ErrorUnexpected ¶ added in v0.4.0
func ErrorUnexpected() error
func EscapeTilde ¶ added in v0.14.0
Returns original path if there was an error
func IgnoreCortexDebug ¶ added in v0.12.0
func IgnoreCortexYAML ¶ added in v0.8.0
func IsFileOrDir ¶
func IsFilePathPython ¶
func IsFilePathYAML ¶
func ListDirRecursive ¶
func MakeEmptyFile ¶
func MakeEmptyFiles ¶
func PathRelativeToCWD ¶ added in v0.13.0
func ReadFileBytes ¶ added in v0.4.0
func ReadFileBytesErrPath ¶ added in v0.10.0
func ReadReqFile ¶
ReadReqFile returns nil if no file
func RelToAbsPath ¶ added in v0.13.0
func SortFilePaths ¶
func TrimDirPrefix ¶
func UserRelToAbsPath ¶ added in v0.13.0
Types ¶
type DirsOrder ¶
type DirsOrder string
var DirsOnBottom DirsOrder = "bottom"
var DirsOnTop DirsOrder = "top"
var DirsSorted DirsOrder = "sorted"
type Error ¶ added in v0.4.0
type Error struct { Kind ErrorKind // contains filtered or unexported fields }
type ErrorKind ¶ added in v0.4.0
type ErrorKind int
func (ErrorKind) MarshalBinary ¶ added in v0.4.0
MarshalBinary satisfies BinaryMarshaler
func (ErrorKind) MarshalText ¶ added in v0.4.0
MarshalText satisfies TextMarshaler
func (*ErrorKind) UnmarshalBinary ¶ added in v0.4.0
UnmarshalBinary satisfies BinaryUnmarshaler Needed for msgpack
func (*ErrorKind) UnmarshalText ¶ added in v0.4.0
UnmarshalText satisfies TextUnmarshaler
type IgnoreFn ¶
IgnoreFn if passed a dir, returning true will ignore all subdirs of dir
func GitIgnoreFn ¶ added in v0.14.0
func IgnoreSpecificFiles ¶ added in v0.13.0
func PromptForFilesAboveSize ¶ added in v0.13.0
promptMsgTemplate should have two placeholders: the first is for the file path and the second is for the file size
Click to show internal directories.
Click to hide internal directories.