tensorflow::FileSystem

This is an abstract class.

#include <file_system.h>

A generic interface for accessing a file system.

Summary

Constructors and Destructors

FileSystem()
~FileSystem()

Public functions

CreateDir(const string & dirname)=0
virtual Status
DeleteDir(const string & dirname)=0
virtual Status
DeleteFile(const string & fname)=0
virtual Status
FileExists(const string & fname)=0
virtual bool
GetChildren(const string & dir, std::vector< string > *result)=0
virtual Status
Returns the immediate children in the given directory.
GetChildrenRecursively(const string & dir, std::vector< string > *result)
virtual Status
Recursively returns all the files in the given directory.
GetFileSize(const string & fname, uint64 *file_size)=0
virtual Status
IsDirectory(const string & fname)
virtual Status
NewAppendableFile(const string & fname, std::unique_ptr< WritableFile > *result)=0
virtual Status
NewRandomAccessFile(const string & fname, std::unique_ptr< RandomAccessFile > *result)=0
virtual Status
The following functions are the implementations used by the corresponding functions in the Env class.
NewReadOnlyMemoryRegionFromFile(const string & fname, std::unique_ptr< ReadOnlyMemoryRegion > *result)=0
virtual Status
NewWritableFile(const string & fname, std::unique_ptr< WritableFile > *result)=0
virtual Status
RenameFile(const string & src, const string & target)=0
virtual Status
Stat(const string & fname, FileStatistics *stat)=0
virtual Status
TranslateName(const string & name) const
virtual string

Public functions

CreateDir

virtual Status CreateDir(
  const string & dirname
)=0

DeleteDir

virtual Status DeleteDir(
  const string & dirname
)=0

DeleteFile

virtual Status DeleteFile(
  const string & fname
)=0

FileExists

virtual bool FileExists(
  const string & fname
)=0

FileSystem

 FileSystem()

GetChildren

virtual Status GetChildren(
  const string & dir,
  std::vector< string > *result
)=0

Returns the immediate children in the given directory.

The returned paths are relative to 'dir'.

GetChildrenRecursively

virtual Status GetChildrenRecursively(
  const string & dir,
  std::vector< string > *result
)

Recursively returns all the files in the given directory.

The returned paths are relative to 'dir'.

GetFileSize

virtual Status GetFileSize(
  const string & fname,
  uint64 *file_size
)=0

IsDirectory

virtual Status IsDirectory(
  const string & fname
)

NewAppendableFile

virtual Status NewAppendableFile(
  const string & fname,
  std::unique_ptr< WritableFile > *result
)=0

NewRandomAccessFile

virtual Status NewRandomAccessFile(
  const string & fname,
  std::unique_ptr< RandomAccessFile > *result
)=0

The following functions are the implementations used by the corresponding functions in the Env class.

NewReadOnlyMemoryRegionFromFile

virtual Status NewReadOnlyMemoryRegionFromFile(
  const string & fname,
  std::unique_ptr< ReadOnlyMemoryRegion > *result
)=0

NewWritableFile

virtual Status NewWritableFile(
  const string & fname,
  std::unique_ptr< WritableFile > *result
)=0

RenameFile

virtual Status RenameFile(
  const string & src,
  const string & target
)=0

Stat

virtual Status Stat(
  const string & fname,
  FileStatistics *stat
)=0

TranslateName

virtual string TranslateName(
  const string & name
) const 

~FileSystem

virtual  ~FileSystem()