You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tauri-plugins-workspace/plugins/fs-extra/guest-js/dist/index.mjs

23 lines
685 B

import { invoke } from '@tauri-apps/api/tauri';
// Copyright 2019-2021 Tauri Programme within The Commons Conservancy
async function metadata(path) {
return await invoke("plugin:fs-extra|metadata", {
path,
}).then((metadata) => {
const { accessedAtMs, createdAtMs, modifiedAtMs, ...data } = metadata;
return {
accessedAt: new Date(accessedAtMs),
createdAt: new Date(createdAtMs),
modifiedAt: new Date(modifiedAtMs),
...data,
};
});
}
async function exists(path) {
return await invoke("plugin:fs-extra|exists", { path });
}
export { exists, metadata };
//# sourceMappingURL=index.mjs.map