waldheinz/fat32-lib

Directories

Opened this issue · 0 comments

If you use fsroot.addDirectory returns a DirectoryEntry when it should return another FsDirectory. Because if you only get a FsDirectoryEntry, you can not use Long file names that are already implemented to navigate throgh the directory tree. The only workaround is to directly use the FATspecific classes which I think were meant to be used via the generic File System Interface.

Additionally the call to addDirectory should also create the . and .. Directory entries so that the image used by another driver can actually navigate into that directory. I get an error doing that.

    File file = new File("C:\\fat32test.img");
    FileDisk filedisk = new FileDisk(file, false);

    FileSystem fs = FileSystemFactory.create(filedisk, false);
    FsDirectory fsroot = fs.getRoot();
    fsroot.
    FsDirectoryEntry subdir = fsroot.addDirectory("adddir");