Article View: borland.public.jbuilder.java.api
Article #2331Detect external FTP completion / File access
From: Owen Green
Date: Wed, 04 Apr 2001 12:18
Date: Wed, 04 Apr 2001 12:18
24 lines
2055 bytes
2055 bytes
I have a server program which needs to be able to assimilate data
transmitted to that server by FTP. For each job there will be a data file
with details of the job and a number of associated (and large) other files
(e.g. audio and image files). The program will scan for new data files and
then look for the associated files that it names. Ideally I would like to be
able to be sure that the external files are complete before progressing the
job any further, howveer I can't find a way to do it. The two most logical
options would seem to involve:
- Detecting the number of active 'connections' to a file, and locking it
as soon as it drops to everything except my process.
- Being able to somehow detect from the FTP server when the transmission
has been completed.
As far as I can tell there is no way of detecting file accesses / doing
file-locking in the standard API, so I was wondering if there is a way of
acheiving this. I have no objections to using JNI, if I must. FYI, I'm using
Linux (Redhat 7 and Slackware).
I suppose a 3rd option would be to implement the FTP server myself, but this
implies a world of pain.
Any advice would be greatly appreciated.
tia
Owen Green
Technical Details
Message-ID:
<3acb1131$1_1@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,5f00da40b52bab4d,start X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2001-04-04 05:24:05 PST From: "Owen Green" <owen@norobots.unique.com> Newsgroups: borland.public.jbuilder.java.api Subject: Detect external FTP completion / File access Date: Wed, 4 Apr 2001 13:18:54 +0100 Lines: 26 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 213.86.7.136 Message-ID: <3acb1131$1_1@dnews> X-Trace: dnews 986386737 213.86.7.136 (4 Apr 2001 05:18:57 -0700) Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews