mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2025-01-10 11:29:20 +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);
|
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.
|
* Get the block number of the bit map.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user