https://github.com/xyproto/files
Functions that deals with files and directories. Can cache Exists and Which.
https://github.com/xyproto/files
files go which
Last synced: 3 months ago
JSON representation
Functions that deals with files and directories. Can cache Exists and Which.
- Host: GitHub
- URL: https://github.com/xyproto/files
- Owner: xyproto
- License: bsd-3-clause
- Created: 2023-08-15T16:48:28.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-27T11:35:30.000Z (9 months ago)
- Last Synced: 2025-04-15T23:56:29.697Z (6 months ago)
- Topics: files, go, which
- Language: Go
- Homepage:
- Size: 43 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# files
Functions for querying files and paths.
## Function signatures
```
func Exists(path string) bool
func IsFile(path string) bool
func IsSymlink(path string) bool
func IsFileOrSymlink(path string) bool
func IsDir(path string) bool
func Which(executable string) string
func WhichCached(executable string) string
func PathHas(executable string) bool
func PathHasCached(executable string) bool
func BinDirectory(filename string) bool
func DataReadyOnStdin() bool
func IsBinary(filename string) bool
func FilterOutBinaryFiles(filenames []string) []string
func TimestampedFilename(filename string) string
func ShortPath(path string) string
func FileHas(path, what string) bool
func ReadString(filename string) string
func CanRead(filename string) bool
func Relative(path string) string
func Touch(filename string) error
func ExistsCached(path string) bool
func ClearCache()
func RemoveFile(path string) error
func DirectoryWithFiles(path string) (bool, error)
func IsExecutable(path string) bool
func IsExecutableCached(path string) bool
```## General info
* Version: 1.9.0
* License: BSD-3
* Author: Alexander F. Rødseth <xyproto@archlinux.org>