Project

dirwait

0.0
No commit activity in last 3 years
No release in over 3 years
Listens to filesystem event notifications until a specified directory is created and then exits.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5
>= 0

Runtime

~> 2.4.0
 Project Readme

DirWait

Watches and waits for a directory to be created and then exits.

When it detects that specified directory was created, it exits cleanly (exit code: 0).

This was hacked together as part of a proof-of-concept for which I needed a portable way to quickly run a command as soon as a specific directory was created. It served that purpose well, but it isn't very robust.

Installing

With RubyGems:

gem install dirwait

With Bundler:

git clone https://github.com/brandt/dirwait.git
cd dirwait
bundle install

Usage

Example: Copy file as soon as the destination become available:

dirwait ~/Dropbox/Company && cp -r /tmp/Archive ~/Dropbox/Company/

Authors

J. Brandt Buckley brandt@runlevel1.com

Monkey patches Listen to enable reporting of directory creation events.