Filter directory on age. The returned function returns true if the age of its argument, as determined by the stat mtime, is greater than the old, which defaults to 2 hours.
Age beyond which true
will be returned
Time to consider the current time, defaults to Date.now()
Create a temporary directory for the provided repository.
Initialize object, creating interval for cleanup and registering shutdown hook.
Filter for reap that performs no filtering, everything gets deleted.
Remove temporary directories created by this object that pass the filter. All operations of this method are wrapped in a try/catch block to make it safe for use in timers and intervals, although the return value will be ignored in those cases.
If this returns true
when passed the basename of the temporary directory, the directory will be deleted
0 if succesful, 1 otherwise
Generated using TypeDoc
Directory manager that creates temporary directories in the system temporary directory. It cleans them up after two hours or on program exit, if possible. The class only creates a single instance of itself.
It uses tmp-promise (built on tmp) to create clean temporary directories to work with git projects from remotes