z_file_mtime (zotonic_core v1.0.0-rc.17)
Keep a registration of file modification times, especially for z_template
Summary
Functions
Convert process state when code is changed
Return the (universal) modification time of file, 0 on enoent
Invalidate all templates of a whole site
Initiates the server.
Insert a template and its dependencies
Check if a template is marked as modified
Mark a file as modified
Return the modification time of a file
Starts the server. IsScannerEnabled is set if inotify, fswatch or the periodic directory scanner is enabled. If not then the cached mtimes are periodically flushed.
Functions
Convert process state when code is changed
-spec file_mtime(file:filename_all()) -> file:date_time() | 0.
Return the (universal) modification time of file, 0 on enoent
Invalidate all templates of a whole site
Initiates the server.
Insert a template and its dependencies
Check if a template is marked as modified
Mark a file as modified
-spec mtime(file:filename_all()) -> {ok, calendar:datetime()} | {error, notfound}.
Return the modification time of a file
-spec start_link() -> gen_server:start_ret().
-spec start_link(boolean()) -> gen_server:start_ret().
Starts the server. IsScannerEnabled is set if inotify, fswatch or the periodic directory scanner is enabled. If not then the cached mtimes are periodically flushed.