Hi Ivan,

On May 16, 2018, at 2:54 PM, Ivan Gerasimov <[email protected]> wrote:

> I wonder if FileSystem.getLength() will start to return the file size when 
> the file name contains wildcards?

Interesting point. A simple program verifies that this is the case:

import java.io.File;

public class FileLength {
    public static void main(String[] args) {
        String name = args.length == 0 ? "C:\\pagefile.sys" : args[1];
        File file = new File(name);
        long length = file.length();
        System.out.format("%s length: %d%n", name, length);
    }
}

> Maybe it is better to compare fileData.cFileName with the pathbuf to make 
> sure we're dealing with the correct file?

I am doubtlessly missing something, but if pathbuf contains wildcards it’s not 
obvious to me exactly how that would help.

Thanks,

Brian

Reply via email to