First commit

This commit is contained in:
2025-12-25 11:16:59 +01:00
commit 0c5ca09a63
720 changed files with 329234 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
import fileIcon from "./fileManager.icon.js";
import panel from "/elements/panel/row.js";
#ifdef SERVER
import fs from "fs";
import path from "path";
#endif
export default class fileList extends panel{
margin = 20;
padding = 20;
display = "block";
async create() {
this.empty();
var files = await this.readFiles();
}
node async readFiles() {
var absolutePath = path.resolve( "./assets/uploads/" );
var files = fs.readdirSync( absolutePath );
for (var i = 0; i < files.length; i++) {
var file = files[i];
var currentFileIcon = new fileIcon();
currentFileIcon.value = file;
this.add( currentFileIcon );
}
return files;
}
}