Skip to content

Commit 23ef3e4

Browse files
ZYSzysTrott
authored andcommitted
fs: extract path conversion and validation to getValidatedPath
Almost all path validations within our file system are combined with: ```js path = toPathIfFileURL(path); validatePath(path); ``` So simply extracted them out into `getValidatedPath` function to `internal/fs/utils.js` to DRY up the code and reduce duplicating them. PR-URL: #27656 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 4a18b87 commit 23ef3e4

File tree

5 files changed

+85
-153
lines changed

5 files changed

+85
-153
lines changed

0 commit comments

Comments
 (0)