dump imports search path - (for in)
主要範例
原始碼
#!/usr/bin/gjs
let list = imports.searchPath;
for (let key in list) {
let item = list[key];
print('Key: ', key);
print('Item: ', item);
print('List: ', list);
print('\n===============\n');
}
function 版
原始碼
#!/usr/bin/gjs
function dump_format_imports_search_path(list) {
for (let key in list) {
let item = list[key];
print('Key: ', key);
print('Item: ', item);
print('List: ', list);
print('\n===============\n');
}
}
function dump_imports_search_path() {
dump_format_imports_search_path(imports.searchPath);
}
dump_imports_search_path();