mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-12-22 08:30:35 +00:00
Added ability to set values; work is done from readFileEntry and
writeFileEntry.
This commit is contained in:
parent
6f3ef71add
commit
4b037eb100
@ -31,14 +31,23 @@ public class ProdosVolumeDirectoryHeader extends ProdosCommonDirectoryHeader {
|
||||
* Constructor for ProdosVolumeDirectoryHeaderEntry.
|
||||
* @param fileEntry
|
||||
*/
|
||||
public ProdosVolumeDirectoryHeader(byte[] fileEntry) {
|
||||
super(fileEntry);
|
||||
public ProdosVolumeDirectoryHeader(ProdosFormatDisk disk) {
|
||||
super(disk, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the name of this volume.
|
||||
*/
|
||||
public String getVolumeName() {
|
||||
return AppleUtil.getProdosString(getFileEntry(), 0);
|
||||
return AppleUtil.getProdosString(readFileEntry(), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the name of this volume.
|
||||
*/
|
||||
public void setVolumeName(String volumeName) {
|
||||
byte[] data = readFileEntry();
|
||||
AppleUtil.setProdosString(data, 0, volumeName.toUpperCase(), 15);
|
||||
writeFileEntry(data);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user