From 9a477a92705f5e3f31df5e6959b0956f20e98136 Mon Sep 17 00:00:00 2001 From: advplyr Date: Mon, 23 Oct 2023 17:28:59 -0500 Subject: [PATCH] Add jsdocs --- server/utils/fileUtils.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/utils/fileUtils.js b/server/utils/fileUtils.js index 7ee16d56..19735fb7 100644 --- a/server/utils/fileUtils.js +++ b/server/utils/fileUtils.js @@ -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)