[erlang-questions] Getting an AppSpec at runtime

Michael Radford <>
Fri Jun 26 05:53:06 CEST 2009


I don't know how to get the actual loaded application spec, but you
can get the one that's currently in the code path using:

{ok, [Spec]} = file:consult(code:where_is_file(atom_to_list(App) ++ "app"))

Mike

David Lutz writes:
> Hello,
> 
> Is there a way to get the AppSpec for a loaded application at runtime?
> 
> I have been reading the docs, especially the application module, but I  
> don't see anything that will return a application specification like  
> the one in the .app file.  I would really like to get at some of the  
> keys such as 'modules' and 'registered' at runtime after the  
> application has been loaded.
> 
> D.L.
> 
> 
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
> 


More information about the erlang-questions mailing list