How do I create a fileWatcher with an onFileChange event using spawn?

bauss jj_1337 at live.dk
Mon Nov 13 12:31:55 UTC 2017


On Monday, 28 August 2017 at 11:25:03 UTC, Jacob Carlborg wrote:
> On 2017-08-28 08:31, Nemanja Boric wrote:
>> On Monday, 28 August 2017 at 06:27:20 UTC, Jacob Carlborg 
>> wrote:
>>> http://code.dlang.org/packages/vibe-core
>>> http://code.dlang.org/packages/libasync
>> 
>> In addition, to avoid polling, it's possible to register 
>> yourself to the operating system so it will tell you when a 
>> modification on the given file has happened: 
>> https://msdn.microsoft.com/en-us/library/aa364417%28VS.85%29.aspx?f=255&MSPPError=-2147217396 http://man7.org/linux/man-pages/man7/inotify.7.html
>
> That's what the two libraries above provides, in a 
> cross-platform way.

There's already a dub package for file system watching:

https://code.dlang.org/packages/fswatch


More information about the Digitalmars-d-learn mailing list