Added ingest file cleanup
This commit is contained in:
parent
9010de6a14
commit
1548701ed3
2
adept.go
2
adept.go
@ -19,6 +19,6 @@ func main() {
|
||||
// transcode file
|
||||
// TODO - t.Transcode(i.Name())
|
||||
// clean up source file
|
||||
// TODO - r.CleanupFile(i.Name())
|
||||
r.CleanupFile(i.Name())
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user