Documentation
¶
Overview ¶
Package remapper provides functionality for renaming files in a directory based on a given extension map.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseExtensionMap ¶
ParseExtensionMap parses a comma-separated string of old:new pairs into a map of extensions to be remapped.
func RemapExtensions ¶
func RemapExtensions(dir string, extMap map[string]string, fsys FileSystem) error
RemapExtensions walks a directory and renames files based on the provided extension map.
Types ¶
type FileSystem ¶
type FileSystem interface {
WalkDir(root string, fn fs.WalkDirFunc) error
Rename(oldpath, newpath string) error
}
FileSystem defines an interface for file system operations needed by the remapper. This allows for a mock implementation in unit tests.
Click to show internal directories.
Click to hide internal directories.