[fpc-devel] Abbrevia Port (was: Portability Standards)

DrDiettrich drdiettrich at compuserve.de
Thu Jan 6 21:48:34 CET 2005

Michael Van Canneyt wrote:

> > method allows to enumerate all contained DirectoryItems.
> On the condition that you also implement by default also a method returning
> a TList or TStringList with TDirectoryItems. Not everyone is comfortable
> with callbacks. The TList/TStringlist method should work fine for not-too-large
> lists.

It's not a matter of the lists, it's a matter of the required
processing. When it takes the same time to build the list than to
extract or decrypt all files, then one may prefer *not* to wait for the
list before simply extracting all files.

Of course it's always possible to build a file list, with a simple
procedure that wraps the enumeration procedure.

> > Question:
> > On Posix (Unix?) file systems the ownership (UID, GID) as well as
> > specific file (executable...) and directory (sticky...) attributes are
> > important, when extracting files from archives. Does FPC already provide
> > according portable access and management procedures?
> No.
> We have stuck to the lowest common denominator, i.e. Windows,
> mainly for compatibility reasons.
> I think that if we're going to be having a new implementation, we should go
> for the maximum, and provide sensible defaults for the 'lesser' OS-es.

Could you imagine a procedure that gets an record with file attributes,
as found in an archive, and then does the best with regards to the
actual host system? I could write such a procedure for both Windows and
e.g. Linux, provided the required OS calls are available. Would that
mean that I had to use libc for the Unix part?


More information about the fpc-devel mailing list