[jcifs] Re: JCIFS 0.9 Objectives

eglass1 at comcast.net eglass1 at comcast.net
Thu Feb 12 13:44:59 GMT 2004


>
> 1) I still consider it a bug, because it's not documented and 
> inconsistent with java.io.File.
>
> 2) I just tried DosFileFilter as workaround, and this seems to work. Can 
> I rely on the constructor with ("*", 0xff) to really return all files?
>

I'm kind of on the fence on this one; on the one hand, it would seem
reasonable to hide hidden files (since they are, you know, hidden).  On the
other hand, this is inconsistent with the results from java.io.File (as noted
by Julian); on a Win32 JVM, doing:

    String files = new File("\\\\server\\share\\dir\\").list();

does include the hidden files in the results.  I guess it's just a coin-flip
between logically expected results and matching the behavior of java.io.File.
I don't really have a strong opinion either way; incompatibility with previous
versions is kind of a pain (the DosFileFilter would need to be added in
Davenport to include the hidden files when it goes to 0.8.0, which would
break compatibility with the 0.7.x series) but I don't think it's a
show-stopper.

On a somewhat-but-not-really-related note, the setLastModified DST
testing mentioned earlier could be done from Java via something like:

    File f = new File("\\\\server\\share\\dir\\file.txt");
    f.setLastModified(System.currentTimeMillis());

i.e., I don't think you'd really need to write Win32 code; you'd just need
a Win32 JVM.


Eric


More information about the jcifs mailing list