2016-11-07 11:11:38 -08:00
|
|
|
namespace pxsim.files {
|
|
|
|
export function appendLine(filename: string, text: string) {
|
|
|
|
const b = board();
|
|
|
|
b.fileSystem.append(filename, text + "\r\n");
|
|
|
|
}
|
|
|
|
export function appendString(filename: string, text: string) {
|
|
|
|
const b = board();
|
|
|
|
b.fileSystem.append(filename, text);
|
|
|
|
}
|
|
|
|
export function appendNumber(filename: string, value: number) {
|
|
|
|
const b = board();
|
|
|
|
b.fileSystem.append(filename, value.toString());
|
|
|
|
}
|
|
|
|
export function remove(filename: string) {
|
|
|
|
const b = board();
|
|
|
|
b.fileSystem.remove(filename);
|
|
|
|
}
|
2017-04-20 00:02:41 -07:00
|
|
|
export function readToSerial(filename: string) {
|
|
|
|
const b = board();
|
|
|
|
let f = b.fileSystem.files[filename];
|
|
|
|
if (f)
|
|
|
|
b.serialState.writeSerial(f);
|
|
|
|
}
|
2016-11-07 11:11:38 -08:00
|
|
|
}
|