bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Request: lib_file_io additions


From: Juergen Sauermann
Subject: Re: [Bug-apl] Request: lib_file_io additions
Date: Mon, 07 Jul 2014 18:44:38 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5

Hi David,

I have added rename (FILE_IO[27]), SVN 364.

I didn't do readdir() because that would need you to opendir(),
loop around readdir() and closedir().

Instead FILE_IO[28] returns the entire directory as a matrix in one go.

Every row is a dirent struct but with a different order:

        filename
        d_ino;       /* inode number */
        d_off;       /* not an offset; see NOTES */
        d_reclen;    /* length of this record */
        d_type;      /* type of file; not supported

The reason for the different order is that not all fields are present in every file system,
so I thought I should put all non-optional fields before the optional field, making the columns
of the result more portable.

/// Jürgen





On 07/07/2014 09:31 AM, David B. Lamkins wrote:
There are two functions that I'd like to access via lib_file_io:
readdir() and rename().

I'm currently implementing these via popen() through lib_file_io, but
that seems inelegant...

I have immediate application for these calls in the component file
library.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]