Copy File
import { initializeMeshSDK, logResponse } from "./util";
import {
CopyFileRequest,
CopyFileResponse
} from "@instruxi-io/mesh-sdk-core";
async function main() {
try {
const mesh = await initializeMeshSDK();
const copyFileRequest: CopyFileRequest = {
file_id: '',
destination: '',
access_grant: ''// OPTIONAL if Admin
}
const copyFileResponse: CopyFileResponse = await mesh.os.copyFile(copyFileRequest);
await logResponse('copyFile:', copyFileResponse);
} catch (error) {
console.error("An error occurred:", error);
}
}
main().catch((error) => {
console.error("Unhandled error in main function:", error);
process.exit(1);
});
Updated 14 days ago