files

type

submodule

files.watch

Alias that run commands when files changes using inotify Note: It uses files.services so you should to start services with initSvcs. Or you could auto start/stop by adding files.services.initSvcs = true; files.services.stopSvcsd = true;

type

lazy attribute set of (submodule)

example

{
  files.watch = {
    FOO = {
      cmd = "echo $file $dir $time $events";
      event = {
        modify = true;
      };
      exclude = ".+\\.png$";
      files = "$PRJ_ROOT/src";
      include = ".+\\.js$";
      recursive = true;
    };
  };
}

default

{
  files.watch = { };
}

files.watch.<name>.enable

Run it when all other services start

type

boolean

default

{
  files.watch.<name>.enable = true;
}

files.watch.<name>.cmd

Command that will run with args $file $dir $time $events

type

string

files.watch.<name>.event

What kinds of events must be watched

type

submodule

default

{
  files.watch.<name>.event = { };
}

files.watch.<name>.event.access

type

boolean

default

{
  files.watch.<name>.event.access = false;
}

files.watch.<name>.event.attrib

type

boolean

default

{
  files.watch.<name>.event.attrib = false;
}

files.watch.<name>.event.close

type

boolean

default

{
  files.watch.<name>.event.close = false;
}

files.watch.<name>.event.close_nonwrite

type

boolean

default

{
  files.watch.<name>.event.close_nonwrite = false;
}

files.watch.<name>.event.close_write

type

boolean

default

{
  files.watch.<name>.event.close_write = false;
}

files.watch.<name>.event.create

type

boolean

default

{
  files.watch.<name>.event.create = false;
}

files.watch.<name>.event.delete

type

boolean

default

{
  files.watch.<name>.event.delete = false;
}

files.watch.<name>.event.modify

type

boolean

default

{
  files.watch.<name>.event.modify = true;
}

files.watch.<name>.event.move

type

boolean

default

{
  files.watch.<name>.event.move = false;
}

files.watch.<name>.event.move_from

type

boolean

default

{
  files.watch.<name>.event.move_from = false;
}

files.watch.<name>.event.move_to

type

boolean

default

{
  files.watch.<name>.event.move_to = false;
}

files.watch.<name>.event.open

type

boolean

default

{
  files.watch.<name>.event.open = false;
}

files.watch.<name>.event.unmount

type

boolean

default

{
  files.watch.<name>.event.unmount = false;
}

files.watch.<name>.exclude

Regexp to exclude matching files

type

string

default

{
  files.watch.<name>.exclude = "(.*/\\.|.+~$)";
}

files.watch.<name>.excludei

Case insesitive regexp to exclude matching files

type

string

default

{
  files.watch.<name>.excludei = "";
}

files.watch.<name>.files

Files to be watched

type

strings concatenated with "\n"

default

{
  files.watch.<name>.files = "$PRJ_ROOT";
}

files.watch.<name>.follow

Follow symbolic links

type

boolean

default

{
  files.watch.<name>.follow = false;
}

files.watch.<name>.include

Regexp to include only matching files

type

string

default

{
  files.watch.<name>.include = "";
}

files.watch.<name>.includei

Case insesitive regexp to include only matching files

type

string

default

{
  files.watch.<name>.includei = "";
}

files.watch.<name>.recursive

Recursivelly watch directories

type

boolean

default

{
  files.watch.<name>.recursive = true;
}

files.watch.<name>.timefmt

type

string

default

{
  files.watch.<name>.timefmt = "%FT%T.000%zZ";
}