agent-backend/contracts/StaticResource/StaticResource.yjs

18 lines
536 B
Plaintext
Raw Permalink Normal View History

2021-09-26 04:49:24 +00:00
contract StaticResource{
@Description("获取Scanner参考:java.util.Scanner")
export function asScanner(args){
var scanner = Global.Resources.loadAsScanner("/local.txt");
return scanner.nextLine();
}
@Description("字符串类型")
export function asString(args){
var str = Global.Resources.loadAsString("/local.txt");
return str;
}
@Description("流类型")
export function asInputStream(args){
var stream = Global.Resources.loadAsInputStream("/local.txt");
return stream.available();
}
}