🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #5616

Re: Amount of open files

#5616
From: Sabetay Toros
Date: Thu, 04 Aug 2005 08:34
52 lines
3007 bytes
Andreas Osswald wrote:
> I want to know how many files are opened by my application without closing
> it. You are right if you say the programm should know this. But if you
> forgot once to use close() or you returned out of a function before you call
> close() a stream keeps open. Under DOS-OS there was the possibility to use
> flushall() it returned all open streams an it was helpful to find errors
> like described.
> 
> Andreas
> 
> 
> "Andrue Cope [TeamB]" <no.spam@not.a.valid.address> schrieb im Newsbeitrag
> news:42f095b9$1@newsgroups.borland.com...
> 
>>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
> 
> 
> 
Andreas,

	Did you compile your code with CodeGuard? CodeGuard must detect and 
report this kind of errors.

Sabetay
Technical Details
Message-ID: <42f1d30a@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <42f09312$1@newsgroups.borland.com> <42f095b9$1@newsgroups.borland.com> <42f0b912$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
Date: Thu, 04 Aug 2005 11:34:17 +0300
From: Sabetay Toros <bilsarbiz@ttnet.net.tr>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Amount of open files
References: <42f09312$1@newsgroups.borland.com> <42f095b9$1@newsgroups.borland.com> <42f0b912$1@newsgroups.borland.com>
In-Reply-To: <42f0b912$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 81.213.124.231
Message-ID: <42f1d30a@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1123144458 81.213.124.231 (4 Aug 2005 01:34:18 -0700)
Lines: 52
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail