Classes
class FastGFile
: 没有线程锁定的文件I / O包装器。
class GFile
: 没有线程锁定的文件I / O包装器。
class Open
: 没有线程锁定的文件I / O包装器。
Functions
tf.gfile.Copy
tf.gfile.Copy(
oldpath,
newpath,
overwrite=False
)
将数据从oldpath复制到newpath。
Args:
- oldpath: string,需要复制内容的文件的名称
- newpath: string,要复制到的文件的名称
- overwrite: boolean,为false时,newpath已存在时会产生错误。
tf.gfile.DeleteRecursively
tf.gfile.DeleteRecursively(dirname)
以递归方式删除dirname下的所有内容。
Args:
- dirname: string,要删除的目录名。
tf.gfile.Exists
tf.gfile.Exists(filename)
确定路径是否存在。
Args:
- filename: string,路径。
Returns:
如果路径存在,则为True,无论是文件还是目录。如果路径不存在且没有文件系统错误,则返回false。
tf.gfile.Glob
tf.gfile.Glob(f