Use dmlc stream when URI protocol is not local file. (#5857)
This commit is contained in:
@@ -75,7 +75,16 @@ class FixedSizeStream : public PeekableInStream {
|
||||
std::string buffer_;
|
||||
};
|
||||
|
||||
std::string LoadSequentialFile(std::string fname);
|
||||
/*!
|
||||
* \brief Helper function for loading consecutive file to avoid dmlc Stream when possible.
|
||||
*
|
||||
* \param uri URI or file name to file.
|
||||
* \param stream Use dmlc Stream unconditionally if set to true. Used for running test
|
||||
* without remote filesystem.
|
||||
*
|
||||
* \return File content.
|
||||
*/
|
||||
std::string LoadSequentialFile(std::string uri, bool stream = false);
|
||||
|
||||
inline std::string FileExtension(std::string const& fname) {
|
||||
auto splited = Split(fname, '.');
|
||||
|
||||
Reference in New Issue
Block a user