mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-12-22 23:29:34 +00:00
Added helper to handle directory file counts.
This commit is contained in:
parent
adf7e1f5ce
commit
879f793e02
@ -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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user