comp.lang.ada
 help / color / mirror / Atom feed
From: qouify <qouify@gmail.com>
Subject: Re: How to get the application path
Date: Mon, 23 Jul 2007 05:06:30 -0700
Date: 2007-07-23T05:06:30-07:00	[thread overview]
Message-ID: <1185192390.472123.223310@w3g2000hsg.googlegroups.com> (raw)
In-Reply-To: <46a456aa$0$25908$426a34cc@news.free.fr>

On 23 juil, 09:20, Rangdalf <rangd...@hotmail.com> wrote:
> Hi,
>
> In C# there is something like Application.startupPath. Is there a
> package or function to get this path.
> I can get the current directory but I need the application one.
>
> Regards

Hi,
the gnat provides the function Locate_Exec_On_Path.
you can locate the path of an application if it is in the path
environment variable by doing this

with gnat.os_lib;
...
A : String_Access := Locate_Exec_On_Path("gcc");
begin
if A = Null then
Put_Line("gcc not found in your PATH");
else
...




  reply	other threads:[~2007-07-23 12:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-23  7:20 How to get the application path Rangdalf
2007-07-23 12:06 ` qouify [this message]
2007-07-23 12:34 ` Stephen Leake
2007-07-23 15:27   ` Adam Beneschan
2007-07-23 16:27     ` Markus E Leypold
2007-07-24 11:14       ` Stephen Leake
2007-07-24 11:35         ` Markus E Leypold
2007-07-23 16:37     ` Dmitry A. Kazakov
2007-07-24 11:11     ` Stephen Leake
2007-07-24 11:44       ` Niklas Holsti
2007-07-24 19:33         ` Randy Brukardt
2007-07-24 20:30           ` Niklas Holsti
2007-07-24 22:01             ` Markus E Leypold
2007-07-24 21:56           ` Markus E Leypold
2007-07-26 10:39             ` Stephen Leake
2007-07-30 23:38               ` Markus E.L.
2007-08-02  4:31                 ` Randy Brukardt
2007-08-02 22:23                   ` Markus E.L. 2
2007-07-24 14:07       ` Robert A Duff
2007-07-24 14:58         ` Adam Beneschan
2007-07-25 10:05         ` Stephen Leake
2007-07-24 14:55       ` Adam Beneschan
2007-07-24 15:41         ` Markus E Leypold
2007-07-25 19:13           ` Randy Brukardt
2007-07-23 18:51 ` Georg Bauhaus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox