def __init__(self, session): project = session.project() directory = project.createFilename(u'session', count=project.session_index) Directory.__init__(self, directory) SessionAgent.__init__(self, session, "directory:%s" % basename(self.directory)) self.rename_parts = []
def __init__(self, project): # Create $PWD/run-0001 directory name Directory.__init__(self, getcwd()) self.directory = self.uniqueFilename('run', count=1, save=False) # Initialize the agent and create the directory ProjectAgent.__init__(self, project, "directory:%s" % basename(self.directory)) self.warning("Create directory: %s" % self.directory) self.mkdir()
def __init__(self, project): # Create $PWD/run-0001 directory name Directory.__init__(self, getcwd()) name = project.application().NAME self.directory = self.uniqueFilename(name, save=False) # Initialize the agent and create the directory ProjectAgent.__init__(self, project, "directory:%s" % basename(self.directory)) self.warning("Create the directory: %s" % self.directory) self.mkdir()
def __init__(self, session, directory): project = session.project() directory = project.directory.uniqueFilename('session', count=project.session_index) Directory.__init__(self, directory) SessionAgent.__init__(self, session, "directory:%s" % basename(self.directory))
def rmtree(self): if not self.directory: return self.info("Remove the directory: %s" % self.directory) Directory.rmtree(self) self.directory = None