I need to monitor a downloads directory, and keep track of the order in which files were written to the directory. The only way I know this is possible in macos is
fswatch, but the documentation seems quite sparse compared to
inotifywatch on linux.
For example, if
002.jpg were downloaded to the directory (in that order), I would need a variable that looks like this:
001.jpg 003.jpg 002.jpg
I only need to monitor new files in this case, not modified files. For example, if
001.jpg is modified, it should not be moved to the end of the list.