【亦秋】iapp调用java获取文件最后修改时间
创建一个命名为1.mjava的模块
写上代码:import java.text.Format;
import java.text.SimpleDateFormat;
import java.io.File;
public static ain(String ar) {
File file = new File(ar);
long wj = file.lastModified();
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String sd = sdf.format(new Date(Long.parseLong(String.valueOf(wj))));
syso(sd);
}
自己在iyu界面调用:call(1,"mjava","1.ain","文件目录")http://cdn.u1.huluxia.com/g4/M00/2D/64/rBAAdl9NImKAVVUTAAASQHnJck0538.png
http://cdn.u1.huluxia.com/g4/M03/2C/72/rBAAdl9Mp_-Aa0iDAAELLgGmAME465.jpg
页:
[1]