file.js 434 B

12345678910111213141516171819
  1. import { file } from "../assets/file.js";
  2. const dump = (path) => {
  3. const target = new file(path);
  4. console.log("Input: " + path);
  5. console.log("Full path: " + target.full_path);
  6. console.log("Name: " + target.name);
  7. console.log("Type: " + target.extension);
  8. console.log("Path: " + target.path);
  9. console.log("");
  10. }
  11. dump("name.txt");
  12. dump("./where_is_the/file.tar.gz");
  13. dump("/OwO/UwU/z.c");
  14. dump("test");