NeahNew/node_modules/webdav/dist/node/operations/exists.js
2025-05-03 14:17:46 +02:00

14 lines
308 B
JavaScript

import { getStat } from "./stat.js";
export async function exists(context, remotePath, options = {}) {
try {
await getStat(context, remotePath, options);
return true;
}
catch (err) {
if (err.status === 404) {
return false;
}
throw err;
}
}