Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@with_timeout
@_blocking_io
def rename(self, source, destination):
return source.rename(destination)
@with_timeout
@_blocking_io
def close(self, file):
return file.close()
@with_timeout
@_blocking_io
def mkdir(self, path, *, parents=False, exist_ok=False):
return path.mkdir(parents=parents, exist_ok=exist_ok)
@with_timeout
@_blocking_io
def write(self, file, *args, **kwargs):
return file.write(*args, **kwargs)
@with_timeout
@_blocking_io
def __anext__(self):
if self.iter is None:
self.iter = path.glob("*")
return self.worker()
@with_timeout
@_blocking_io
def _open(self, path, *args, **kwargs):
return path.open(*args, **kwargs)
@with_timeout
@_blocking_io
def unlink(self, path):
return path.unlink()
@with_timeout
@_blocking_io
def rmdir(self, path):
return path.rmdir()
@with_timeout
@_blocking_io
def read(self, file, *args, **kwargs):
return file.read(*args, **kwargs)
@with_timeout
@_blocking_io
def is_file(self, path):
return path.is_file()