Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions
dmlc::io::LocalFileSystem Class Reference

local file system More...

#include <local_filesys.h>

Inherits dmlc::io::FileSystem.

Public Member Functions

virtual ~LocalFileSystem ()
 destructor
 
virtual FileInfo GetPathInfo (const URI &path)
 get information about a path
 
virtual void ListDirectory (const URI &path, std::vector< FileInfo > *out_list)
 list files in a directory
 
virtual SeekStreamOpen (const URI &path, const char *const flag, bool allow_null)
 open a stream, will report error and exit if bad thing happens NOTE: the IStream can continue to work even when filesystem was destructed
 
virtual SeekStreamOpenForRead (const URI &path, bool allow_null)
 open a seekable stream for read
 

Static Public Member Functions

static LocalFileSystemGetInstance (void)
 get a singleton of LocalFileSystem when needed
 

Detailed Description

local file system

Member Function Documentation

◆ GetInstance()

static LocalFileSystem * dmlc::io::LocalFileSystem::GetInstance ( void  )
inlinestatic

get a singleton of LocalFileSystem when needed

Returns
a singleton instance

◆ GetPathInfo()

FileInfo dmlc::io::LocalFileSystem::GetPathInfo ( const URI &  path)
virtual

get information about a path

Parameters
paththe path to the file
Returns
the information about the file

◆ ListDirectory()

void dmlc::io::LocalFileSystem::ListDirectory ( const URI &  path,
std::vector< FileInfo > *  out_list 
)
virtual

list files in a directory

Parameters
pathto the file
out_listthe output information about the files

◆ Open()

SeekStream * dmlc::io::LocalFileSystem::Open ( const URI &  path,
const char *const  flag,
bool  allow_null 
)
virtual

open a stream, will report error and exit if bad thing happens NOTE: the IStream can continue to work even when filesystem was destructed

Parameters
pathpath to file
urithe uri of the input
allow_nullwhether NULL can be returned, or directly report error
Returns
the created stream, can be NULL when allow_null == true and file do not exist

◆ OpenForRead()

SeekStream * dmlc::io::LocalFileSystem::OpenForRead ( const URI &  path,
bool  allow_null 
)
virtual

open a seekable stream for read

Parameters
paththe path to the file
allow_nullwhether NULL can be returned, or directly report error
Returns
the created stream, can be NULL when allow_null == true and file do not exist

The documentation for this class was generated from the following files: