mirror of
https://gitee.com/BDWare/agent-backend
synced 2025-01-10 01:44:14 +00:00
18 lines
536 B
Plaintext
18 lines
536 B
Plaintext
|
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();
|
|||
|
}
|
|||
|
}
|