filetools: Utilities to work with files and filenames

Utilities to work with files and filenames

Functions

addSuffix(filename, suffix)

Add a suffix between the name and the extension

filesBetween(files, start, end)

Returns files between the given times

findFile(path, file)

Look for file recursively starting at path.

fixLineEndings(filename)

increaseSuffix(filename)

Given a filename, return a new filename with an increased suffix if the filename already has a suffix, or a suffix if it hasn't

modifiedDate(filename)

get the modified time of f as a datetime.date

normalizePath(path)

Convert path to an absolute path with user expanded (something that can be safely passed to a subprocess)

withExtension(filename, extension)

Return a new filename where the original extension has been replaced with extension