watchdrain is a simple command line tool that monitors a directory until it is empty of files.
I wrote it as an exercise to experiment with Go channels, goroutines, context, and testing in Go.
go install github.com/mabego/watchdrain@latestgit clone https://github.com/mabego/watchdrain.gitcd watchdraingo run . <directory>watchdrain -deadline 1m <directory>See watchdrain --help for more information.