[Lazarus] File functions in codetools FileProcs

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Jul 13 14:10:24 CEST 2010


On Tue, 13 Jul 2010 15:11:13 +0300
Juha Manninen <juha.manninen at phnet.fi> wrote:

> > Probably you already do this: if the project uses the LCL it
> > should use the unit FileUtil.
> 
> Ok, it is either codetools/FileProcs or lcl/FileUtil, depending on which one 
> is last in Uses section.

Uses section?
Maybe you mean required package?
BTW, unit FileUtil is one of the base units of the LCL, without
widgetset dependencies. Using it in console applications is safe.

Note: Eventually such units will be put into a separate package. But I
don't want to make many people's live harder just to make things more
clean for a few experts. When we switched to fpmake and improved a
few things in the IDE the time will come.


> I guess it is again some more duplicated code between codetools and LCL.

Also keep in mind that codetools units are under GPL.

 
> The problem comes when converting console applications. The easy solution will 
> be not to convert those UTF8 functions for console apps. It is not very 
> logical though because file name conversions should not depend on the GUI 
> library LCL.

If you want to convert it to a LCL application, you probably want
to use UTF8 file names.
But when converting a console application it is not clear if
UTF8 filenames is a good choice (IMO).


Mattias




More information about the Lazarus mailing list