harakiri v1.2.0 Harakiri.Helpers
Summary
Functions
Convenience to get environment bits. Avoid all that repetitive
Application.get_env( :myapp, :blah, :blah)
noise
Get first row from the table
Get mtime from the OS for the given path
Get the key to be used as on the ETS table
Insert given data into :harakiri_table
.
Returns {:ok, key}
if inserted, :duplicate
if given data existed
Get the row for the given key, if it exists. If given key is
:"$end_of_table"
it will return nil
Insert the given data on the table. Update if it was lready there
Macros
Spit to output any passed variable, with location information
Functions
Gets a Map
and puts it into an ActionGroup
just the way Harakiri
needs it.
The Map
should look like:
%{paths: ["file1","file2"], app: :myapp, action: :reload, lib_path: "path"}
Convenience to get environment bits. Avoid all that repetitive
Application.get_env( :myapp, :blah, :blah)
noise.
Insert given data into :harakiri_table
.
Returns {:ok, key}
if inserted, :duplicate
if given data existed.
If option :create_paths
is truthy, then it tries to create every path
in data[:paths]. It returns {:error, reason}
when that failed.
Get the row for the given key, if it exists. If given key is
:"$end_of_table"
it will return nil
.