Skip to content

Commit 9379ad0

Browse files
committed
adding export methods
1 parent 2500966 commit 9379ad0

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

builder-tool/src/builderTool.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,21 @@ def addDirectory(self, path, dest = None):
235235
shutil.copytree(path, self.tempDir + '/' + dest, ignore=shutil.ignore_patterns('*.pyc', '*.pyo', '__pycache__'))
236236
return True
237237

238+
def exportFile(self, path, dest = None):
239+
"""Copy a file from the temporary directory to the distribution directory"""
240+
Logger.debug('Exporting file: ' + path)
241+
if dest is None:
242+
dest = path
243+
shutil.copy(self.tempDir + '/' + path, self.distDir + '/' + dest)
244+
return True
245+
246+
def exportFolder(self, path, dest = None):
247+
"""Copy a directory from the temporary directory to the distribution directory"""
248+
Logger.debug('Exporting directory: ' + path)
249+
if dest is None:
250+
dest = path
251+
shutil.copytree(self.tempDir + '/' + path, self.distDir + '/' + dest)
252+
return True
238253

239254
def __clean(self) -> bool:
240255
Logger.info('Cleaning temporary directory')

0 commit comments

Comments
 (0)