Calculating Joliet Directory Block Size

I’m using NeroCOM to write file system data to CD/DVD media. To make this work correctly, I need to be able to determine the number of blocks used by each file and directory (so as not to overfill the disc).

I can do this easily for files. But for directories I’m stumped. What’s the algorithm that relates file system entries to blocks needed by a directory entry? If a directory contains X files, is there some factor I can use to map that to F times X blocks? Or does the space need depend on the length of the names of the entries in the directory?

  • Mark

See if EstimateTrackSize method of NeroDrive can help you faster and in a more compatible way.

Thanx, Alex, but I’m using the FileSystem interfaces, not ISOTrack. Do you have any leads on a reference to an algorithm I could use?

  • Mark

p.s. EstimateTrackSize() is not documented in the NeroCOM docs, although the method is exposed.

If you look a bit further you will find that the third parameter is a NeroFileSystemTrackOptions object. Looking at its properties reveals the FileSystemDescContainer property which is the exact thing you are seeking.

NeroCOM docs are not always in sync with the latest version but we do our best to keep it up.

Sorry, but this is not a solution. I don’t want to estimate the size of the entire FileSystemDescContainer, I want to estimate the size of each directory structure before I add it to the FileSystem structures. I guess I could do a “before and after” call to EstimateTrackSize(), but that would be quite time intensive given the number of entries I’m checking.

Let’s move on past the EstimateTrackSize() method. It does not do what I need.

Does anyone have any information on my original question, which is how the block size of Joliet directory entries are calculated?

  • Mark

Also, FYI, EstimateTrackSize() returns void, so it’s a little hard to see how one extracts the actual track size information :slight_smile: