Added ingest file cleanup

This commit is contained in:
2022-08-31 22:50:42 -04:00
parent 9010de6a14
commit 1548701ed3
2 changed files with 9 additions and 1 deletions

View File

@ -76,6 +76,14 @@ func (r *Repository) ArchiveFile(inFile string) {
}
}
func (r *Repository) CleanupFile(inFile string) {
// create ingest path
ingestPath := filepath.Join(r.basePath, "ingest", inFile)
// remove the file
os.Remove(ingestPath)
}
func create_repo_dir(path string) {
_, err := os.Stat(path)
if os.IsNotExist(err) {