🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Behaviour if Findfirst/Findnext

#3538
From: Jos�
Date: Thu, 25 May 2006 16:53
31 lines
2070 bytes
On Thu, 25 May 2006 11:20:44 -0500, " Bruce Salzman"
<bruce@nospam.org> wrote in borland.public.cppbuilder.nativeapi:

>> There are two sets of functions to search for files:
>> findfirst/findnext and FindFirst/FindNext.
>>
>> It is my impression that their behaviour differs on differint
>> computers. Can anything be said about this?
>>
>> 1. What is the order of files? It can be arbitrary, numeric (2, 19,
>> 20) and alphabetic (19, 2, 20)
>
>
>I don't know for sure, but I'd guess that these functions search the 
>file allocation table from beginning to end. 

More likely: the directory (or folder)

In fact my computer produces the file names in alphabetical order (2
is more than 19), but AFAIK there is no guarantee that this always
happens. The Windows Explorer even displays filenames in a very smart
numerical order (where 2 is less than 19), and it seems reasonable to
expect  that the same ordering is used by findfirst/findnext, but this
is not the case.

In fact I am making a program which renames all files sequentially.
Therefore the order of files is important to me. Furthermore, funny
things might happen if a file is found again after having been
renamed.
-- 
Jos�
Technical Details
Message-ID: <ovnb72hoepr9mer64jeikc1pth6t427c5l@4ax.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.volia.net!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <5v4b725541pgl6mgme0m2sc5n0ni1bm94p@4ax.com> <4475d95a$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,57df08767886389
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII
From: Jos� <jose@127.0.0.1>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Behaviour if Findfirst/Findnext
Date: Thu, 25 May 2006 18:53:35 +0200
Message-ID: <ovnb72hoepr9mer64jeikc1pth6t427c5l@4ax.com>
References: <5v4b725541pgl6mgme0m2sc5n0ni1bm94p@4ax.com> <4475d95a$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 82.75.14.62
X-Trace: newsgroups.borland.com 1148576032 82.75.14.62 (25 May 2006 09:53:52 -0700)
Lines: 31
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.volia.net!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail