1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
""" Filesystem utils """ import os def strip_prefix(string, prefix): """Returns a string, stripped from its prefix""" if string.startswith(prefix): return string[len(prefix):] else return string def remove_file(repo, dst): repo.index.remove(dst) os.remove(dst)