Esempio n. 1
0
 def make(self):
     # mkdir(self.control.out)
     self.prepare()
     for resource in self.resources:
         path = j(self.root, resource.path)
         log.info("make(%r)", path)
         mkdir(os.path.dirname(path))
         if isinstance(resource, Page):
             with open(path, "w") as fo:
                 fo.write(resource.html())
         else:
             copyfile(resource.path, path)
Esempio n. 2
0
def make_ignore_file():
    if not os.path.exists(IGNORE_FILE):
        mkdir(os.path.dirname(IGNORE_FILE))
        I("making new ignore file %s", IGNORE_FILE)
        with open(IGNORE_FILE, "w") as fo:
            fo.write(ignore_text)
Esempio n. 3
0
 def test_mkdir_relative(self):
     """ Test relative directories creation """
     dst = "rdir/./rdir"
     files.mkdir(dst)
Esempio n. 4
0
 def test_mkdir_absolute(self):
     """ Test absolute directories creation """
     dst = j(TEST_ROOT, "adir/adir")
     files.mkdir(dst)