Re: [AD] [4.3] fshooks and stat(2)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sunday 03 December 2006 2:45 pm, Thomas Fjellstrom wrote:
> On Sunday 03 December 2006 5:33 am, Elias Pschernig wrote:
> > As for stat, how would e.g. the implementation of a function like:
> >
> > uint64_t filesize(char const *filename)
>
> At the moment,
> size_t al_fs_file_size(AL_FILE *);
>
> You don't have to open the file, just create a new handle with
> AL_FILE *al_fs_create_handle(char *path);
>
> But this requires a handle, which is a bit inconvenient. Bob suggested
> maybe go with a static strict like libc, but reserve some space in case we
> want to expand the struct.
>
> > look like with it?
> >

kazzmir aka Jon Rafkind (I think) suggested merging AL_FILE and AL_DIR into 
AL_FSNode, and using the current stat api. Not a bad idea, but it still 
inconvenient for users just wanting stat info. So, do we care about how 
inconvenient it is? Is Jon's idea a good way to go? (I'm leaning towards it 
atm).

-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/