def open(self, mode="a", buffering=None): """open the file Args: mode: file open mode for the first file to be opened. other files will be opened in "w" mode buffering: same as in the built-in "open" command Returns: None Raises: IOError: same as in the built-in "open" command a.infra.lock.multi_process.LockError - when lock is not taken when required (only working in multi processes mode). """ self._verifyLockTakenIfNeeded() self._buffering = buffering self._rotatingFileSizeEnforcer.prepare() self._rotatingFileSizeEnforcer.moveCurrentToPending() newFileName = self._rotatingFileSizeEnforcer.getCurrentFileName() self._log("open").debug1("first file name '%s'", newFileName) File.__init__(self, logger=self._log, fileName=newFileName, mode=mode, buffering=buffering) self._wasOpened = True
def open (self, mode = "a", buffering = None): """open the file Args: mode: file open mode for the first file to be opened. other files will be opened in "w" mode buffering: same as in the built-in "open" command Returns: None Raises: IOError: same as in the built-in "open" command a.infra.lock.multi_process.LockError - when lock is not taken when required (only working in multi processes mode). """ self._verifyLockTakenIfNeeded() self._buffering = buffering self._rotatingFileSizeEnforcer.prepare() self._rotatingFileSizeEnforcer.moveCurrentToPending() newFileName = self._rotatingFileSizeEnforcer.getCurrentFileName() self._log("open").debug1("first file name '%s'", newFileName) File.__init__(self, logger = self._log, fileName = newFileName, mode = mode, buffering = buffering) self._wasOpened = True
def __init__(self, path=""): File.__init__(self, path)
def __init__(self, filename, filepath): File.__init__(self, filename, filepath) self.width, self.height = self.dimensions() self.entropy = self.entropy()
def __init__(self, name, id, path, type, service=None, last_modified=None): File.__init__(self, name, id, path, type, last_modified=last_modified) self.get(service) if service is not None: self.get(service) self.children = self._get_children(service)
def __init__(self): File.__init__(self) Ping.__init__(self) Valid.__init__(self)