[fpc-pascal]FindFirst/FindNext question

XHajT03 at mbox.vol.cz XHajT03 at mbox.vol.cz
Fri Sep 20 22:16:36 CEST 2002


From:           	"Inpromptu " <inpromptu at operamail.com>
To:             	fpc-pascal at deadlock.et.tudelft.nl
Date sent:      	Fri, 20 Sep 2002 03:01:22 +0800
Subject:        	[fpc-pascal]FindFirst/FindNext question
Send reply to:  	fpc-pascal at deadlock.et.tudelft.nl

   Hi,

>    When I look for directories using
>    FindFirst(mypath,Directory,mySearchRec) from the dos unit, I can't
>    see a difference between a real Directory and a link (on liunux
>    systems). How can I do that? I'm using dos unit because I have to
>    keep my source code TP6.0 compatible, but if i don't have other
>    choice, i would avoid all Borland compatibility... I prefer
>    FreePascal... Thanks, and excuse my english...

 the Dos unit interface was created with DOS in mind, so more 
advanced concepts like links, three levels of permissions, owners, 
different times, ..., are somewhat difficult to indicate using the 
limited amount of  available fields. In theory, we might modify the 
RTL functions to use something like the SysFile bit in file 
attributes to indicate non-standard files, but it's questionable, 
whether it would probably hurt compatibility in the end. If you want 
to distinct platform specific features like links, you should use 
platform specific calls for this -I don't program for Linux myself, 
but I'd suggest to use the FStat call from unit Linux (Unix in FPC 
1.1) for this.

> ps:Do not use acronyms like IMO, OTOH, or such, because i don't

 OK, ;-) I've tried - I only used RTL and DOS... ;-)

> understand WTF stand for... ;). I think this acronyms are a problem
> for all non-english readers.

 Well, they don't impose a bigger problem for me, for example, 
although I'm definitely no native speaker / reader. Not so many of 
them are really used, so it isn't that difficult to get used to them 
(and if you find one not yet known to you, you can always look it up 
in some list acronym list). But it's just a subjective opinion, of 
course.

Tomas





More information about the fpc-pascal mailing list