Skip to content

Commit

Permalink
Add jsdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
advplyr committed Oct 23, 2023
1 parent 976ae50 commit 9a477a9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/utils/fileUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ const filePathToPOSIX = (path) => {
}
module.exports.filePathToPOSIX = filePathToPOSIX

/**
* Check path is a child of or equal to another path
*
* @param {string} parentPath
* @param {string} childPath
* @returns {boolean}
*/
function isSameOrSubPath(parentPath, childPath) {
parentPath = filePathToPOSIX(parentPath)
childPath = filePathToPOSIX(childPath)
Expand Down

0 comments on commit 9a477a9

Please sign in to comment.