Documentation
¶
Overview ¶
Package filesystem provides generic filesystem operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MoveAndMerge ¶
MoveAndMerge moves entries from sourceDir to targetDir. It merges directories recursively if they exist in both source and target. If an entry in sourceDir is a file that already exists in targetDir, it returns an error instead of overwriting it. It also returns an error if sourceDir and targetDir are the same. TODO(https://github.com/googleapis/librarian/issues/6627): Deprecate and remove MoveAndMerge after MoveAndMergeWithKeep is in production across all generators.
func MoveAndMergeWithKeep ¶ added in v0.25.0
func MoveAndMergeWithKeep(sourceDir, targetDir, libraryRoot string, keepFunc func(string) bool) error
MoveAndMergeWithKeep moves entries from sourceDir to targetDir. It merges directories recursively if they exist in both source and target. Existing target files are preserved if keepFunc returns true, otherwise they are overwritten.
Types ¶
This section is empty.