Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 88ae0bfe23
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (20 sloc) 0.886 kB
-module(evfs_app).
-behaviour(application).
-include("internal.hrl").
%% Application callbacks
-export([start/2, prep_stop/1, stop/1]).
%% ===================================================================
%% Application callbacks
%% ===================================================================
start(_StartType, _StartArgs) ->
{ok, Pid} = evfs_sup:start_link(),
{ok, OriginalFilename} = evfs_filename:load(),
{evfs_file_server, FileServer, _Type, _Modules} =
lists:keyfind(evfs_file_server, 1, supervisor:which_children(Pid)),
{ok, Pid, {FileServer, evfs:original_file_server(FileServer), OriginalFilename}}.
prep_stop({_FileServer, _OriginalFileServer, Filename} = State) ->
ok = evfs_filename:unload(Filename),
State.
stop({_FileServer, OriginalFileServer, _Filename}) ->
true = register(?FILE_SERVER, OriginalFileServer),
ok.
Jump to Line
Something went wrong with that request. Please try again.