Article View: borland.public.jbuilder.java.api
Article #2332Re: Detect external FTP completion / File access
From: Paul Loht
Date: Wed, 04 Apr 2001 13:14
Date: Wed, 04 Apr 2001 13:14
17 lines
1469 bytes
1469 bytes
> - Being able to somehow detect from the FTP server when the
transmission
> has been completed.
I don't know if you can open a file exclusively in Java ( I'm new to the
language )but if you can, try to open the file exclusively in a loop, here
is code that shows how I did this once in pascal:
repeat
Sleep(250);
H := SysUtils.FileOpen(PChar(FileName), fmOpenReadWrite +
fmShareExclusive);
until (H <> Invalid_Handle_Value) or not FileExists(FileName);
FileClose(H);
The loop would repeat until the ftp server was finished receiving the file,
then I could grab it.
Technical Details
Message-ID:
<3acb1e59$1_2@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnewsReferences:
<3acb1131$1_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,5f00da40b52bab4d X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2001-04-04 06:38:07 PST Reply-To: "Paul Loht" <ploht@promisant.com> From: "Paul Loht" <ploht@promisant.com> Newsgroups: borland.public.jbuilder.java.api References: <3acb1131$1_1@dnews> Subject: Re: Detect external FTP completion / File access Date: Wed, 4 Apr 2001 09:14:27 -0400 Lines: 19 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: 66.32.85.160 Message-ID: <3acb1e59$1_2@dnews> X-Trace: dnews 986390105 66.32.85.160 (4 Apr 2001 06:15:05 -0700) Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews