From: Pi <pi3_1415926536@yahoo.ca>
Subject: Re: How to rename a file?
Date: Thu, 27 Sep 2001 22:54:58 -0400
Date: 2001-09-27T22:54:58-04:00 [thread overview]
Message-ID: <ehRs7.11927$%r.3214260@news20.bellglobal.com> (raw)
In-Reply-To: Y3Rs7.46826$QK.32812951@news1.sttln1.wa.home.com
Thanks buddy,
I'll try it tomorrow :-)
DuckE wrote :
> Here's how I make the OS call on WindowsNT/W2K using ObjectAda or GNAT:
>
> WITH Win32;
> WITH Win32.WinBase;
> WITH Interfaces.C;
> ...
> PACKAGE WinBase RENAMES Win32.WinBase;
> PACKAGE C RENAMES Interfaces.C;
>
> USE TYPE Win32.BOOL;
> USE TYPE Win32.DWORD;
> ...
> PROCEDURE RenameFileDFU( sourceFileNameDFU, destFileNameDFU : STRING;
> renamedDFU : out BOOLEAN ) IS
> result : Win32.BOOL;
> sourceName : ALIASED C.Char_Array := C.To_C( sourceFileNameDFU );
> destName : ALIASED C.Char_Array := C.To_C( destFileNameDFU );
> BEGIN
> result := WinBase.MoveFile( sourceName(0)'UNCHECKED_ACCESS,
> destName(0)'UNCHECKED_ACCESS );
> renamedDFU := result /= Win32.FALSE;
> END RenameFileDFU;
>
> I hope this helps,
> SteveD
>
> "Pi" <pi3_1415926536@yahoo.ca> wrote in message
> news:MYKs7.11405$%r.2963162@news20.bellglobal.com...
> > It may sound stupid, but I didn't find anything.
> >
> > Is there a way to rename files in Ada?
> >
> > Other than :
> > create a new file,
> > copy every byte into the new one,
> > delete the old one.
> >
> > --
> > 3,14159265359
> >
>
>
--
3,14159265359
next prev parent reply other threads:[~2001-09-28 2:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-27 19:43 How to rename a file? Pi
2001-09-27 23:09 ` tmoran
2001-09-27 23:36 ` Larry Kilgallen
2001-09-28 2:16 ` DuckE
2001-09-28 2:54 ` Pi [this message]
2001-09-28 3:41 ` David Botton
2001-09-28 7:39 ` Lutz Donnerhacke
2001-09-28 17:34 ` Pascal Obry
2001-09-28 18:39 ` Larry Kilgallen
2001-09-30 1:51 ` David Botton
2001-09-30 8:53 ` Pascal Obry
2001-09-30 10:21 ` Florian Weimer
2001-09-30 14:53 ` Pascal Obry
2001-09-29 5:02 ` DuckE
2001-09-28 3:16 ` David Botton
2001-09-28 16:03 ` Jeffrey Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox