MCPcopy Index your code
hub / github.com/ds300/patch-package / parseFileMode

Function parseFileMode

src/patch/parse.ts:402–412  ·  view source on GitHub ↗
(mode: string)

Source from the content-addressed store, hash-verified

400}
401
402function parseFileMode(mode: string): FileMode {
403 // tslint:disable-next-line:no-bitwise
404 const parsedMode = parseInt(mode, 8) & 0o777
405 if (
406 parsedMode !== NON_EXECUTABLE_FILE_MODE &&
407 parsedMode !== EXECUTABLE_FILE_MODE
408 ) {
409 throw new Error("Unexpected file mode string: " + mode)
410 }
411 return parsedMode
412}
413
414export function parsePatchFile(file: string): ParsedPatchFile {
415 const lines = file.split(/\n/g)

Callers 1

interpretParsedPatchFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…