📄 vfs.pc
字号:
// vfs sample
#include "../UtilCode/vfserror.h"
enumdir(int vol, string path) {
int dir, f, attr, d;
int first = true;
string name, out;
puts(" " + path + ":\n");
if (0 == volopendir(vol, path, &dir)) {
while (direnum(dir, first, &name, &attr)) {
first = false;
out = " " + name + ": " + hex(attr);
if ((attr & vfsAttrDirectory) == 0) {
volopenfile(vol, path + name, vfsModeRead, &f);
out = out + " : " + filesize(f) + " : " + datex(filegetdate(f, 2), 2);
fileclose(f);
}
puts(out + "\n");
}
puts(" [end]\n");
}
}
main() {
int vol;
int first = true;
while (enumvols(first, &vol)) {
puts("vol: " + vollabel(vol) + "\n");
enumdir(vol, "/");
first = false;
}
puts("[end]\n");
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -