INNER CODE UNIT · JavaScript
createParentDirectory
xonotic/darkplaces · wasm/pre.js:25
function createParentDirectory(filePath) {
//
// Split a filePath into parts, create the directory hierarchy
//
parts = filePath.split('/');
for (let i = parts.length - 1; i > 0; i--) {
localDir = '/game/' + parts.slice(0, -i).join('/')
try {
FS.mkdir(localDir);
}
catch {
// Directory already exists
}
}
}
function startDownload(localPath, remotePath) {
//