Skip to content

Does not work on Debian 12 x64 Linux without FSWForcePoll #27

@ponyatov

Description

@ponyatov
    "dependencies": {
        "fswatch": "~>0.6.1"
    "versions": []
dmd --version
DMD64 D Compiler v2.105.3
Copyright (C) 1999-2023 by The D Language Foundation, All Rights Reserved written by Walter Bright
uname -a
Linux i7 6.1.0-13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29) x86_64 GNU/Linux

sample code:

void watcher() {
    auto src = FileWatch("src/", true);
    auto views = FileWatch("views/", true);
    auto dub = FileWatch("dub.json", true);
    while (true) {
        Thread.sleep(1111.msecs);
        foreach (e; src.getEvents)
            writeln(e.path, '\t', e.type);
        foreach (e; views.getEvents)
            writeln(e.path, '\t', e.type);
        foreach (e; dub.getEvents)
            writeln(e.path, '\t', e.type);
    }
}

void main(string[] args) {
    writeln(args);
    // autorestart
    spawn(&watcher);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions