mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2025-01-02 19:29:17 +00:00
Add putcc65 as a visible external method so we can call it from the ant interface
This commit is contained in:
parent
4580a7183f
commit
a04ee91c3d
@ -142,8 +142,7 @@ public class ac {
|
|||||||
* Put fileName from the local filesytem into the file named fileOnImageName on the disk named imageName;
|
* Put fileName from the local filesytem into the file named fileOnImageName on the disk named imageName;
|
||||||
* Note: only volume level supported; input size unlimited.
|
* Note: only volume level supported; input size unlimited.
|
||||||
*/
|
*/
|
||||||
public static void putFile(String fileName, String imageName, String fileOnImageName, String fileType,
|
public static void putFile(String fileName, String imageName, String fileOnImageName, String fileType, String address) throws IOException, DiskFullException {
|
||||||
String address) throws IOException, DiskFullException {
|
|
||||||
Name name = new Name(fileOnImageName);
|
Name name = new Name(fileOnImageName);
|
||||||
File file = new File(fileName);
|
File file = new File(fileName);
|
||||||
if (!file.canRead())
|
if (!file.canRead())
|
||||||
@ -200,6 +199,20 @@ public class ac {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Put file fileName into the file named fileOnImageName on the disk named imageName;
|
||||||
|
* Assume a cc65 style four-byte header with start address in bytes 0-1.
|
||||||
|
*/
|
||||||
|
public static void putCC65(String fileName, String imageName, String fileOnImageName, String fileType)
|
||||||
|
throws IOException, DiskFullException {
|
||||||
|
|
||||||
|
byte[] header = new byte[4];
|
||||||
|
if (System.in.read(header, 0, 4) == 4) {
|
||||||
|
int address = AppleUtil.getWordValue(header, 0);
|
||||||
|
putFile(fileName, imageName, fileOnImageName, fileType, Integer.toString(address));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Put <stdin> into the file named fileName on the disk named imageName;
|
* Put <stdin> into the file named fileName on the disk named imageName;
|
||||||
* Assume a cc65 style four-byte header with start address in bytes 0-1.
|
* Assume a cc65 style four-byte header with start address in bytes 0-1.
|
||||||
|
Loading…
Reference in New Issue
Block a user