filefive
Version:
SFTP/FTP/Amazon S3 client and dual-panel file manager for macOS and Linux
13 lines (12 loc) • 366 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.split = split;
const posix_1 = require("node:path/posix");
function split(path) {
const parts = [];
while (path && path != '/' && path != '.') {
parts.push((0, posix_1.basename)(path));
path = (0, posix_1.dirname)(path);
}
return parts.reverse();
}