MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / statOrNull

Function statOrNull

javascript/selenium-webdriver/lib/web_extension.js:188–197  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

186}
187
188async function statOrNull(file) {
189 try {
190 return await fs.stat(file)
191 } catch (err) {
192 if (err.code === 'ENOENT' || err.code === 'ENAMETOOLONG') {
193 return null
194 }
195 throw err
196 }
197}
198
199function checkExtensionArg(extension) {
200 if (typeof extension !== 'string' || extension === '') {

Callers 2

encodeExtensionFunction · 0.85
extensionDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected