arudradey's picture
download
raw
576 Bytes
"use strict";
function joinPath(pathArray)
{
if (pathArray.length > 0)
{
return pathArray.join("/") + "/";
}
else
{
return "";
}
}
function resolveDotSegments(pathArray)
{
var pathAbsolute = [];
pathArray.forEach( function(dir)
{
if (dir !== "..")
{
if (dir !== ".")
{
pathAbsolute.push(dir);
}
}
else
{
// Remove parent
if (pathAbsolute.length > 0)
{
pathAbsolute.splice(pathAbsolute.length-1, 1);
}
}
});
return pathAbsolute;
}
module.exports =
{
join: joinPath,
resolveDotSegments: resolveDotSegments
};

Xet Storage Details

Size:
576 Bytes
·
Xet hash:
add0fed414028998f18931a9e7ef497ff706abb5636b3ff08eea2743ce6b1d8d

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.