Hi All,
I am using the opendir(), readdir(), and closedir() to handle a directory.
According to man page of readdir(), should retrun the files in sorted order. I mean field d_name[] in struct dirent retruned by readdir() should contain the file name which is next in the sorted list of files. But i am getting something else. Please clear me related to the use of readdir().
I have the files in dir
(00.00.htm, 00.01.htm, 00.02.htm, 00.03.htm, 01.00.htm, 01.01.htm ............)
i am accepting the same sequence return by readdir().
But i am getting
(00.02, 00.03, 01.00.htm, 01.01.htm ............, 00.00.htm, 00.01.htm).
I know i am doing some mistake by what.........
Regards,
Amar
I am using the opendir(), readdir(), and closedir() to handle a directory.
According to man page of readdir(), should retrun the files in sorted order. I mean field d_name[] in struct dirent retruned by readdir() should contain the file name which is next in the sorted list of files. But i am getting something else. Please clear me related to the use of readdir().
I have the files in dir
(00.00.htm, 00.01.htm, 00.02.htm, 00.03.htm, 01.00.htm, 01.01.htm ............)
i am accepting the same sequence return by readdir().
But i am getting
(00.02, 00.03, 01.00.htm, 01.01.htm ............, 00.00.htm, 00.01.htm).
I know i am doing some mistake by what.........
Regards,
Amar