filefive
Version:
SFTP/FTP/Amazon S3 client and dual-panel file manager for macOS and Linux
18 lines (17 loc) • 743 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const Connection_1 = __importDefault(require("../Connection"));
const URI_1 = require("../utils/URI");
const node_path_1 = require("node:path");
const App_1 = __importDefault(require("../App"));
async function default_1(file, content) {
const { id, path } = (0, URI_1.parseURI)(file);
await Connection_1.default.get(id).write(path, content);
if (!(0, URI_1.isLocal)(file)) {
App_1.default.remoteWatcher.refresh((0, URI_1.createURI)(id, (0, node_path_1.dirname)(path)));
}
}