|
@@ -12,7 +12,7 @@ start_link(Name, Path) ->
|
|
|
fs_sup:start_link(SupName, Name, FileHandler, Path).
|
|
|
|
|
|
subscribe() -> subscribe(default_fs).
|
|
|
-subscribe(Name) -> gen_event:add_sup_handler(Name, {fs_event_bridge, self()}, [self()]).
|
|
|
+subscribe(Name) -> gen_event:add_sup_handler(Name, {fs_event_bridge, erlang:self()}, [erlang:self()]).
|
|
|
|
|
|
path() ->
|
|
|
case application:get_env(fs, path) of
|
|
@@ -24,7 +24,7 @@ known_events() -> known_events(default_fs).
|
|
|
known_events(Name) -> gen_server:call(name(Name, "file"), known_events).
|
|
|
|
|
|
start_looper() -> start_looper(default_fs).
|
|
|
-start_looper(Name) -> spawn(fun() -> subscribe(Name), loop() end).
|
|
|
+start_looper(Name) -> erlang:spawn(fun() -> subscribe(Name), loop() end).
|
|
|
|
|
|
loop() ->
|
|
|
receive
|
|
@@ -55,19 +55,22 @@ mad_file(DepsPath) ->
|
|
|
end.
|
|
|
|
|
|
priv_file(Cmd) ->
|
|
|
- case code:priv_dir(fs) of
|
|
|
- Priv when is_list(Priv) ->
|
|
|
- Path = filename:join(Priv, Cmd),
|
|
|
- case filelib:is_regular(Path) of
|
|
|
+ case code:priv_dir(fs) of
|
|
|
+ Priv when erlang:is_list(Priv) ->
|
|
|
+ Path = filename:join(Priv, Cmd),
|
|
|
+ case filelib:is_regular(Path) of
|
|
|
true -> Path;
|
|
|
- false -> false end;
|
|
|
+ false -> false
|
|
|
+ end;
|
|
|
+
|
|
|
_ ->
|
|
|
- false end.
|
|
|
+ false
|
|
|
+ end.
|
|
|
|
|
|
|
|
|
name(Name, Prefix) ->
|
|
|
NameList = erlang:atom_to_list(Name),
|
|
|
- list_to_atom(NameList ++ Prefix).
|
|
|
+ erlang:list_to_atom(NameList ++ Prefix).
|
|
|
|
|
|
|
|
|
ets_created() ->
|