개정판 20af735c
AppDocData.setCurrentProject 호출 시 Child Directory 생성
DTI_PID/DTI_PID/AppDocData.py | ||
---|---|---|
365 | 365 |
''' |
366 | 366 |
def setCurrentProject(self, project): |
367 | 367 |
self.project = project |
368 |
|
|
368 |
self.makeChildDir() |
|
369 | 369 |
try: |
370 | 370 |
# Creates or opens a file called mydb with a SQLite3 DB |
371 | 371 |
dbPath = self.getCurrentProject().getDbFilePath() + "/ITI_PID.db" |
... | ... | |
395 | 395 |
conn.close() |
396 | 396 |
|
397 | 397 |
''' |
398 |
@brief Make Directory |
|
399 |
@author Jeongwoo |
|
400 |
@date 18.05.08 |
|
401 |
''' |
|
402 |
def makeChildDir(self): |
|
403 |
project = AppDocData.instance().getCurrentProject() |
|
404 |
dbDir = project.getDbFilePath() |
|
405 |
if not os.path.exists(dbDir): |
|
406 |
os.makedirs(dbDir) |
|
407 |
imgDir = project.getImageFilePath() |
|
408 |
if not os.path.exists(imgDir): |
|
409 |
os.makedirs(imgDir) |
|
410 |
svgDir = project.getSvgFilePath() |
|
411 |
if not os.path.exists(svgDir): |
|
412 |
os.makedirs(svgDir) |
|
413 |
outputDir = project.getOutputPath() |
|
414 |
if not os.path.exists(outputDir): |
|
415 |
os.makedirs(outputDir) |
|
416 |
tempDir = project.getTempPath() |
|
417 |
if not os.path.exists(tempDir): |
|
418 |
os.makedirs(tempDir) |
|
419 |
|
|
420 |
''' |
|
398 | 421 |
@brief Get current Project |
399 | 422 |
''' |
400 | 423 |
def getCurrentProject(self): |
내보내기 Unified diff