Article View: borland.public.cppbuilder.nativeapi
Article #5585Re: Amount of open files
From: Andrue Cope [TeamB]
Date: Wed, 03 Aug 2005 10:00
Date: Wed, 03 Aug 2005 10:00
28 lines
2129 bytes
2129 bytes
Andreas Osswald wrote: > Hallo, is there any way to get the total amount of open files, opened > by the own application ? What do you mean exactly? If you want to know how many open files your application has at any one time then I'd have to question your overall design and implementation. IMO there should be no reason for you not to know that. A program that doesn't know what state it's in sounds very dubious to me. If you want to know how many files your application has opened in total (ie;how many times has open() been called) then I can think of no standard way to do that. The easiest way would be to have all file I/O open requests go through your own routine that can keep a count. This can only be enforced through programming convention but it's not a bad idea. We always use our own home grown functions (classes in more recent code) because for us having that kind of centralised control over file I/O offers many advantages. Logging all I/O is not something we bother with at the moment but it would certainly be one application. -- Andrue Cope [TeamB] [Bicester, Uk] http://info.borland.com/newsgroups/guide.html
Technical Details
Message-ID:
<42f095b9$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!217.73.144.45.MISMATCH!feeder2.ecngs.de!ecngs!feeder.ecngs.de!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<42f09312$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,6a0cee41cdcb7499 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Andrue Cope [TeamB]" <no.spam@not.a.valid.address> Subject: Re: Amount of open files Newsgroups: borland.public.cppbuilder.nativeapi References: <42f09312$1@newsgroups.borland.com> Date: Wed, 3 Aug 2005 11:00:23 +0100 User-Agent: XanaNews/1.17.5.7 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 NNTP-Posting-Host: 217.207.223.34 Message-ID: <42f095b9$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1123063225 217.207.223.34 (3 Aug 2005 03:00:25 -0700) Lines: 28 X-Authenticated-User: acope Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!217.73.144.45.MISMATCH!feeder2.ecngs.de!ecngs!feeder.ecngs.de!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail