S3 filesystem.
More...
#include <s3_filesys.h>
Inherits dmlc::io::FileSystem.
|
|
virtual | ~S3FileSystem () |
| | destructor
|
| |
| void | SetCredentials (const std::string &s3_access_id, const std::string &s3_secret_key) |
| | Sets S3 access credentials.
|
| |
| 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 Stream * | Open (const URI &path, const char *const flag, bool allow_null) |
| | open a stream, will report error and exit if bad thing happens NOTE: the Stream can continue to work even when filesystem was destructed
|
| |
| virtual SeekStream * | OpenForRead (const URI &path, bool allow_null) |
| | open a seekable stream for read
|
| |
◆ GetInstance()
| static S3FileSystem * dmlc::io::S3FileSystem::GetInstance |
( |
void |
| ) |
|
|
inlinestatic |
get a singleton of S3FileSystem when needed
- Returns
- a singleton instance
◆ GetPathInfo()
| FileInfo dmlc::io::S3FileSystem::GetPathInfo |
( |
const URI & |
path | ) |
|
|
virtual |
get information about a path
- Parameters
-
- Returns
- the information about the file
◆ ListDirectory()
| void dmlc::io::S3FileSystem::ListDirectory |
( |
const URI & |
path, |
|
|
std::vector< FileInfo > * |
out_list |
|
) |
| |
|
virtual |
list files in a directory
- Parameters
-
| path | to the file |
| out_list | the output information about the files |
◆ Open()
| Stream * dmlc::io::S3FileSystem::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 Stream can continue to work even when filesystem was destructed
- Parameters
-
| path | path to file |
| uri | the uri of the input |
| flag | can be "w", "r", "a" |
| allow_null | whether 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::S3FileSystem::OpenForRead |
( |
const URI & |
path, |
|
|
bool |
allow_null |
|
) |
| |
|
virtual |
open a seekable stream for read
- Parameters
-
| path | the path to the file |
| allow_null | whether NULL can be returned, or directly report error |
- Returns
- the created stream, can be NULL when allow_null == true and file do not exist
◆ SetCredentials()
| void dmlc::io::S3FileSystem::SetCredentials |
( |
const std::string & |
s3_access_id, |
|
|
const std::string & |
s3_secret_key |
|
) |
| |
Sets S3 access credentials.
- Parameters
-
| s3_access_id | The S3 Access Key ID |
| s3_secret_key | The S3 Secret Key |
- Returns
- the information about the file
The documentation for this class was generated from the following files:
- External/xgboost/dmlc-core/src/io/s3_filesys.h
- External/xgboost/dmlc-core/src/io/s3_filesys.cc