Article View: borland.public.jbuilder.java.language
Article #18189Re: Dateistatus einer Shared-Datei
From: Fa.Zeppelin
Date: Mon, 27 Jul 1998 00:00
Date: Mon, 27 Jul 1998 00:00
37 lines
1851 bytes
1851 bytes
Hello Ingo, I did have the same problems writing to a file out of a recursive method... my solution was : try to write data in logical units of work, like a COMMIT statement in database-programming (for example : collect all stuff that belongs together in a bag, and then write the entire bag [or only the delta] to the file) - if you do so, you no longer need to know if the file is currently in use because you send entiry logical units- I hope this helps ! Maybe I could explain it more clearly in german. Jan Hoffman Ingo Kopido schrieb in Nachricht <35b84257.5083865@123.0.0.50>... >Hello Jan, >Thanks for your suggestion but that wouldn't work. >I've tried this before but the result of the canRead() method >is true for an opened shared file. A shared file is writable and >readable if its opened. Because of this fact the application do not >know if the file is opened so the canRead() or canWrite() method >wouldn't help. > At this time i'm doing it this way : > - trying to rename the file to a temprary file (name) > - if the temp-file exits then the original-file is not opened > - else the original-file is opened by another application > >This works but it's not satisfying at all. > >So if you got a better solution please let me know. > >Thanks, >Ingo. >
Technical Details
Message-ID:
<6php45$88g9@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<35a222c0.15024653@123.0.0.50> <6p23t6$k705@forums.borland.com> <35b84257.5083865@123.0.0.50>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,e7e28aec3a69650 X-Google-Attributes: gidf74b3,public From: "Fa.Zeppelin" <Fa.Zeppelin@micronet.de> Subject: Re: Dateistatus einer Shared-Datei Date: 1998/07/27 Message-ID: <6php45$88g9@forums.borland.com> X-Deja-AN: 375277049 References: <35a222c0.15024653@123.0.0.50> <6p23t6$k705@forums.borland.com> <35b84257.5083865@123.0.0.50> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: Fa.Zeppelin Newsgroups: borland.public.jbuilder.java.language