std.file.listdir doesn't work on directory NTFS directory mounted by NTFS-3G

Daniel Keep daniel.keep.lists at gmail.com
Sat Feb 24 04:10:36 PST 2007



miraks wrote:
> Hi,
> 
> I am on MANDRIVA 2007 and I am using NTFS-3G to mount NTFS directory.
> 
> When I use the following code on a directory containing mp3 files:
> auto d_source_files = std.file.listdir(args[1], "*.mp3");
> The list is empty.
> 
> If I launch the same code on the same data but on a FAT32 disc, then the result is the expected one.
> 
> Why std.file.listdir works on FAT32 and not on NTFS ? 

The source code for std.file.listdir comes with the DMD archive; after
giving it a quick look, it looks like it's just using ordinary linux
calls: specifically, opendir and readdir.  I find it somewhat hard to
believe that the code would work on one filesystem but not another if
Phobos was at fault (kind of like a program failing to load because your
room is painted blue instead of green -- it shouldn't matter).

If you're up to it, you might want to try translating the code to C and
see if it does the same thing.  If it does, then it's an OS problem; if
it doesn't, then something's screwy with Phobos.  If that's not an
option, since the source for the function is there, you can always copy
the code and make sure that the various functions are returning the
expected values.

I can't do much more to help, since I don't run Linux :3  Good luck.

	-- Daniel

-- 
Unlike Knuth, I have neither proven or tried the above; it may not even
make sense.

v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D
i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP  http://hackerkey.com/



More information about the Digitalmars-d mailing list