1
0
Fork 0
mirror of synced 2024-06-28 11:00:55 +12:00
budibase/packages/server/src/utilities/centralPath.js

23 lines
624 B
JavaScript
Raw Normal View History

const path = require("path")
// this simply runs all of our path join and resolve functions through
// a central location incase we need to add some protection to file paths
/**
* Exactly the same as path.join
* @param args Any number of string arguments to add to a path
* @returns {string} The final path ready to use
*/
2021-05-03 19:31:09 +12:00
exports.join = function (...args) {
return path.join(...args)
}
/**
* Exactly the same as path.resolve
* @param args Any number of string arguments to add to a path
* @returns {string} The final path ready to use
*/
2021-05-03 19:31:09 +12:00
exports.resolve = function (...args) {
return path.resolve(...args)
}