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.
|
* Constructor for ProdosVolumeDirectoryHeaderEntry.
|
||||||
* @param fileEntry
|
* @param fileEntry
|
||||||
*/
|
*/
|
||||||
public ProdosVolumeDirectoryHeader(byte[] fileEntry) {
|
public ProdosVolumeDirectoryHeader(ProdosFormatDisk disk) {
|
||||||
super(fileEntry);
|
super(disk, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the name of this volume.
|
* Return the name of this volume.
|
||||||
*/
|
*/
|
||||||
public String getVolumeName() {
|
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