MCPcopy Index your code
hub / github.com/isomorphic-git/isomorphic-git / lstat

Method lstat

src/models/FileSystem.js:267–277  ·  view source on GitHub ↗

* Return the Stats of a file/symlink if it exists, otherwise returns null. * Rethrows errors that aren't related to file existence. * * @param {string} filename - The path to the file or symlink. * @returns {Promise } - The stats object, or `null` if the file doesn't exist.

(filename)

Source from the content-addressed store, hash-verified

265 * @returns {Promise<Object|null>} - The stats object, or `null` if the file doesn't exist.
266 */
267 async lstat(filename) {
268 try {
269 const stats = await this._lstat(filename)
270 return stats
271 } catch (err) {
272 if (err.code === 'ENOENT' || (err.code || '').includes('ENS')) {
273 return null
274 }
275 throw err
276 }
277 }
278
279 /**
280 * Reads the contents of a symlink if it exists, otherwise returns null.

Callers 15

updateIndexFunction · 0.95
resetIndexFunction · 0.95
statusFunction · 0.95
rmRecursiveFunction · 0.80
checkAndWriteBlobFunction · 0.80
applyTreeChangesFunction · 0.80
_checkoutFunction · 0.80
updateWorkingDirFunction · 0.80
updateCachedIndexFileFunction · 0.80
isIndexStaleFunction · 0.80
acquireMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected