UNPKG

filefive

Version:

SFTP/FTP/Amazon S3 client and dual-panel file manager for macOS and Linux

18 lines (17 loc) 428 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.winToUnix = winToUnix; exports.unixToWin = unixToWin; function winToUnix(path) { return '/' + path.replace(/\\/g, '/'); } function unixToWin(path) { path = path.replace(/^\//, '').replace(/\//g, '\\'); if (!path) { path = '\\'; } else if (path.match(/^[a-zA-Z]:$/)) { path += '\\'; } return path; }