staruml / staruml-cpp

C++ extension for StarUML
MIT License
173 stars 66 forks source link

We need some option to overwrite exist directory #1

Closed toori67 closed 9 years ago

toori67 commented 9 years ago
directory = FileSystem.getDirectoryForPath(fullPath);
directory.create(function (err, stat)  { .. });

if dir exist, generator code do nothing and stop. Need option to overwrite.

this is from docs

Create a directory

toori67 commented 9 years ago
   if(err === "AlreadyExists"){
                        Async.doSequentially(
                            elem.ownedElements,
                            function (child) {
                                return self.generate(child, fullPath, options);
                            },
                            false
                       ).then(result.resolve, result.reject);
                    }
                    result.reject(err);

check err message and just keep going.

niklauslee commented 9 years ago

조건을 아래와 같이 합치는 것도 좋을거 같네요

if (!err || err === "AlreadyExists") { ... }