update VFS API

This commit is contained in:
Dany LE 2021-10-24 20:56:18 +02:00
parent 86a94a817a
commit 66e96cc0db
3 changed files with 17 additions and 8 deletions

Binary file not shown.

View File

@ -388,6 +388,7 @@ namespace OS {
if (v.filename[0] === "." && !this.showhidden) {
return;
}
if(!v.text)
v.text = v.filename;
if (v.text.length > 10) {
v.text = v.text.substring(0, 9) + "...";
@ -412,6 +413,7 @@ namespace OS {
if (v.filename[0] === "." && !this.showhidden) {
return;
}
if(!v.text)
v.text = v.filename;
v.iconclass = v.iconclass ? v.iconclass : v.type;
const row = [
@ -467,6 +469,7 @@ namespace OS {
if (v.filename[0] === "." && !this.showhidden) {
return undefined;
}
if(!v.text)
v.text = v.filename;
if (v.type === "dir") {
v.nodes = [];

View File

@ -1356,11 +1356,17 @@ namespace OS {
constructor(path: string) {
super(path);
if (this.basename) {
let v: any = OS.setting.system.packages[this.basename];
v.type = "app";
v.mime = "antos/app";
v.size = 0;
this.info = v as FileInfoType;
let v = OS.setting.system.packages[this.basename];
this.info = {} as FileInfoType;
for(const p in v)
{
this.info[p] = v[p];
}
this.info.type = "app";
this.info.mime = "antos/app";
this.info.size = 0;
this.info.text = v.name;
}
this.ready = true;
}