MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / getFile

Method getFile

javascript/selenium-webdriver/io/zip.js:110–121  ·  view source on GitHub ↗

* Returns the contents of the file in this zip archive with the given `path`. * The returned promise will be rejected with an InvalidArgumentError * if either `path` does not exist within the archive, or if `path` refers * to a directory. * * @param {string} path the path to t

(path)

Source from the content-addressed store, hash-verified

108 * contents as a buffer.
109 */
110 getFile(path) {
111 let file = this.z_.file(path)
112 if (!file) {
113 return Promise.reject(new InvalidArgumentError(`No such file in zip archive: ${path}`))
114 }
115
116 if (file.dir) {
117 return Promise.reject(new InvalidArgumentError(`The requested file is a directory: ${path}`))
118 }
119
120 return Promise.resolve(file.async('nodebuffer'))
121 }
122
123 /**
124 * Returns the compressed data for this archive in a buffer. _This method will

Callers 4

installExtensionFunction · 0.80
zip_test.jsFile · 0.80
toLocalUrlMethod · 0.80
startServersMethod · 0.80

Calls 1

fileMethod · 0.80

Tested by 2

toLocalUrlMethod · 0.64
startServersMethod · 0.64