code
stringlengths
3
6.57k
writelines(self, seq)
self._fp.writelines(seq)
tell(self)
location (which can be used in e.g., seek)
self._fp.tell()
seek(self, offset, whence=0)
offset (conditioned on whence)
seek()
self._fp.seek(offset, whence)
truncate(self, new_size=None)
self._fp.truncate(new_size)
readline(self, max_length=-1)
line (up to max_length)
self._fp.readline(max_length)
readlines(self, sizehint=None)
file.readlines()
self._fp.readlines(sizehint)
self._fp.readlines()
__iter__(self)
handle (not synchronized)
__next__(self)
handle (not synchronized)
open("filename", "r")
list(fp)
next(self._fp)
Size(self)
self.tell()
self.seek(0, 2)
self.tell()
self.seek(cur)
read(self, n=-1)
read (if negative, read to end of file handle.)
self._fp.read(n)
close(self)
self._fp.close()
staticmethod(_synchronized)
GFile(_GFileBase)
__init__(self, name, mode='r')
super(GFile, self)
__init__(name, mode, _Pythonlocker()
FastGFile(_GFileBase)
__init__(self, name, mode='r')
super(FastGFile, self)
__init__(name, mode, _Nulllocker()
lock()
_Pythonlocker(object)
__init__(self)
threading.RLock()
lock(self)
self._lock.acquire()
unlock(self)
self._lock.release()
_Nulllocker(object)
lock()
unlock()
lock(self)
unlock(self)
Exists(path)
exists (as a dir, file, non-broken symlink)
os.path.exists(path)
IsDirectory(path)
os.path.isdir(path)
Glob(glob)
_glob.glob(glob)
MkDir(path, mode=0o755)
os.mkdir(path, mode)
MakeDirs(path, mode=0o755)
NOTE(mrry)
MakeDirs("")
os.makedirs(path, mode)
RmDir(directory)
os.rmdir(directory)
Remove(path)
the (non-directory)
os.remove(path)
Rename(oldpath, newpath, overwrite=False)
Exists(newpath)
IsDirectory(newpath)
OSError(errno.EEXIST, os.strerror(errno.EEXIST)
os.rename(oldpath, newpath)
DeleteRecursively(path)
remove (may be a non-empty directory)
IsDirectory(path)
shutil.rmtree(path)
Remove(path)
ListDirectory(directory, return_dotfiles=False)
os.listdir()
dir (not absolute paths)
gfile.ListDir(my_dir)
os.path.join(my_dir, f)
os.listdir(directory)
f.startswith('.')
Walk(top, topdown=1, onerror=None)
order (True)
order (False)
ignored. (This is the same semantics as Python's os.walk()
files. (dirname, [subdirname, subdirname, ...], [filename, filename, ...])
os.walk(top, topdown=topdown, onerror=onerror)
Stat(path)
Stat()