: m_ManifestPath( manifest_path )
54: m_ManifestPath( manifest_path.AsString() )
70 if( ! manifest_file.
IsFile() ) {
75 if( ! manifest_stream ) {
82 while( manifest_line_iter != end_iter ) {
84 if( !
file.IsFile() ) {
86error_string +=
" Bad file: ";
87error_string += *manifest_line_iter;
91 CNcbiIfstreammanifest_file_stream( manifest_line_iter->c_str() );
92 if( ! manifest_file_stream ) {
94error_string +=
" Cannot read file: ";
95error_string += *manifest_line_iter;
107 if( ! manifest_stream ) {
114vector<string> file_paths;
117 for( ; manifest_line_iter != end_iter; ++manifest_line_iter) {
120file_paths.push_back(path);
132 stringonly_file_path;
135 if( ! manifest_stream ) {
142 if( manifest_line_iter != end_iter ) {
143only_file_path = *manifest_line_iter++;
144 if( manifest_line_iter != end_iter ) {
149 returnonly_file_path;
156 if( ! manifest_stream ) {
160ostream_iterator<string> manifest_iterator( manifest_stream,
"\n");
161 copy( file_paths.begin(), file_paths.end(), manifest_iterator );
Iterator to walk the files in the manifest.
vector< string > GetAllFilePaths() const
Returns all the file paths referenced by the manifest.
CFileManifest(const string &manifest_path)
string GetSingleFilePath() const
Returns the first file path in the manifest.
void Validate() const
Check the manifest for consistency and open all the referenced files.
void WriteManyFilePaths(const vector< string > &file_paths)
Write a list of files to a manifest. Will overwrite any previous data.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
static string NormalizePath(const string &path, EFollowLinks follow_links=eIgnoreLinks)
Normalize a path.
static string CreateAbsolutePath(const string &path, ERelativeToWhat rtw=eRelativeToCwd)
Get an absolute path from some, possibly relative, path.
bool IsFile(EFollowLinks follow=eFollowLinks) const
Check whether a directory entry is a file.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ofstream CNcbiOfstream
Portable alias for ofstream.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
Defines command line argument related classes.
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
NCBI C++ stream class wrappers for triggering between "new" and "old" C++ stream libraries.
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4