[DGD] Re: DGD LPC (?)

Felix A. Croes felix at dworkin.nl
Sun Aug 2 16:44:04 CEST 1998


Mikael Lind <z94lind at mtek.chalmers.se> wrote:

>[...]
> The problem with your solution is that get_dir()'s wildcard matching is
> ignored...
>
> get_dir("/a/*") returns the files "b", "c" and "*" but your
> file_size("/a/*") returns -1. (Should return the size of "/a/*".) Probably
> not a problem if your files have names clean from wildcards.
>
> get_dir("/a/*") returns the file "b" and your file_size("/a/*") returns the
> size of "/a/b". (Should return -1.) Might be a problem.

The continuing confusion about get_dir() is probably an argument in
favour of of putting a file_info() function in the kernel lib's auto
object, returning get_dir() info for a single file, with wildcards
properly avoided.


>[...]
>
> This may seem like a very costly way to determine the size of a file. I'm
> however under the impression that you could put in a lot of checks and still
> have the actual file I/O call as the major tick drainer. Especially if you
> precompile. Am I wrong?

Correct.

Dworkin



More information about the DGD mailing list