MCPcopy Create free account
hub / github.com/appium/appium / addFile

Function addFile

scripts/crowdin-update-docs-resources.mjs:67–77  ·  view source on GitHub ↗

* @param {string} name * @param {number} storageId * @param {string|null} [parentDirectoryId] * @returns {Promise }

(name, storageId, parentDirectoryId)

Source from the content-addressed store, hash-verified

65 * @returns {Promise<number>}
66 */
67async function addFile(name, storageId, parentDirectoryId) {
68 const {data: fileData} = await performApiRequest('/files', {
69 method: 'POST',
70 payload: {
71 name,
72 storageId,
73 directoryId: parentDirectoryId,
74 },
75 });
76 return fileData.id;
77}
78
79/**
80 * @returns {Promise<Record<string, any>[]>}

Callers 1

ensureFileStructureFunction · 0.85

Calls 1

performApiRequestFunction · 0.90

Tested by

no test coverage detected