pxt-calliope/sim/state/filesystem.ts

18 lines
599 B
TypeScript
Raw Normal View History

2016-11-07 20:11:38 +01: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);
}
}