mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-11 10:49:59 +01:00
* remove trailing spaces from Run.js Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * minimize module requirements demonstrated with invert fixes #122 Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * refactored modules Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * update docs Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * remove all trailing spaces from all files Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * fixing crop module Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * fix Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * update contributing.md Signed-off-by: tech4GT <varun.gupta1798@gmail.com>
21 lines
460 B
JavaScript
21 lines
460 B
JavaScript
const fs = require('fs')
|
|
|
|
|
|
|
|
/*
|
|
* This function checks if the directory exists, if not it creates one on the given path
|
|
* Callback is called with argument error if an error is encountered
|
|
*/
|
|
function makedir(path,callback){
|
|
fs.access(path,function(err){
|
|
if(err) fs.mkdir(path,function(err){
|
|
if(err) callback(err);
|
|
callback();
|
|
});
|
|
else callback()
|
|
});
|
|
};
|
|
|
|
module.exports = exports = {
|
|
makedir: makedir
|
|
} |