Documentation ¶
Overview ¶
Package fs provides a set of filesystem helpers that can be useful when developing Cloud Native Buildpacks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Copy ¶
Copy will move a source file or directory to a destination. For directories, move will remap relative symlinks ensuring that they align with the destination directory. If the destination exists prior to invocation, it will be removed.
func Exists ¶
Exists returns true if a file or directory at the given path is present and false otherwise.
func IsEmptyDir ¶
IsEmptyDir checks to see if a directory exists and is empty.
func Move ¶
Move will move a source file or directory to a destination. For directories, move will remap relative symlinks ensuring that they align with the destination directory. If the destination exists prior to invocation, it will be removed. Additionally, the source will be removed once it has been copied to the destination.
Types ¶
type ChecksumCalculator ¶
type ChecksumCalculator struct{}
ChecksumCalculator can be used to calculate the SHA256 checksum of a given file or directory. When given a directory, checksum calculation will be performed in parallel.
func NewChecksumCalculator ¶
func NewChecksumCalculator() ChecksumCalculator
NewChecksumCalculator returns a new instance of a ChecksumCalculator.