Categorygithub.com/goulash/osutil
modulepackage
1.0.2
Repository: https://github.com/goulash/osutil.git
Documentation: pkg.go.dev

# README

goulash/osutil

Package osutil provides utility functions especially related to interaction with the outside world, aka the operating system.

# Functions

CombineCmdArgs puts the given arguments all in a slice.
CopyFile tries to copy src to dst.
CopyFileLazy is the same as CopyFile, except that it avoids copying the file when the destination already has the same contents.
DirExists returns ex = true if the file exists and is a directory, and returns err != nil if any other error occured (such as permission denied).
Exists returns ex = true if the given file exists, regardless whether it is a file or a directory.
FileExists returns ex = true if the file exists and is not a directory, and returns err != nil if any other error occured (such as permission denied).
FileExt returns the file type as identified by the (lowercase) extension.
MoveFile tries to move src to dst.
MoveFileLazy is the same as MoveFile, except that it avoids copying the file when the destination already has the same contents.
RunCmd runs the command and returns whether it completed correctly or not.
SameContents returns same = true if src and dst both exist and have the same file contents.
No description provided by the author

# Structs

No description provided by the author