Added helper to handle directory file counts.

This commit is contained in:
Robert Greene 2003-01-11 22:05:21 +00:00
parent adf7e1f5ce
commit 879f793e02

View File

@ -83,6 +83,24 @@ public class ProdosCommonDirectoryHeader extends ProdosCommonEntry {
writeFileEntry(data);
}
/**
* Increment the number of active entries by one.
*/
public void incrementFileCount() {
byte[] data = readFileEntry();
data[0x21]++;
writeFileEntry(data);
}
/**
* Decrement the number of active entries by one.
*/
public void decrementFileCount() {
byte[] data = readFileEntry();
if (data[0x21] != 0) data[0x21]--;
writeFileEntry(data);
}
/**
* Get the block number of the bit map.
*/