function for_all_files(parse, N = 1, prefix = "", result = {}) {
    var path = "", content = "";
    var t = 0;
    var list = os.file.listDir(dir);
    for (var file of list) {
        try {
            path = os.path.join(dir, file);
            content = os.file.readRelativeToScript(path);
            try {
                t = 0;
                for (var n = 0; n < N; n++)
                    t += parse(content);
                result[prefix + path] = { time: t / N, bytes: content.length };
            } catch (e) {
                // ignore all errors for now.
                result[prefix + path] = { time: null, bytes: content.length };
            }
        } catch (e) {
            // ignore all read errors.
        }
    }
    return result;
}
// `result` argument using the `prefix` key for the filenames.
`result` argument using the `prefix` key for the filenames.
` result ` argument using the ` prefix ` key for the filenames .
function for_all_files(parse, N = 1, prefix = "", result = {}) {
    var path = "", content = "";
    var t = 0;
    var list = os.file.listDir(dir);
    for (var file of list) {
        try {
            path = os.path.join(dir, file);
            content = os.file.readRelativeToScript(path);
            try {
                t = 0;
                for (var n = 0; n < N; n++)
                    t += parse(content);
                result[prefix + path] = { time: t / N, bytes: content.length };
            } catch (e) {
                result[prefix + path] = { time: null, bytes: content.length };
            }
        } catch (e) {
        }
    }
    return result;
}
function for_all_files ( parse , N = 1 , prefix = "" , result = { } ) { var path = "" , content = "" ; var t = 0 ; var list = os . file . listDir ( dir ) ; for ( var file of list ) { try { path = os . path . join ( dir , file ) ; content = os . file . readRelativeToScript ( path ) ; try { t = 0 ; for ( var n = 0 ; n < N ; n ++ ) t += parse ( content ) ; result [ prefix + path ] = { time : t / N , bytes : content . length } ; } catch ( e ) { result [ prefix + path ] = { time : null , bytes : content . length } ; } } catch ( e ) { } } return result ; }
`result` argument using the `prefix` key for the filenames.
` result ` argument using the ` prefix ` key for the filenames .
// ignore all errors for now. // ignore all read errors.