Isis Developer Reference
|
Internalizes a list of files. More...
#include <FileList.h>
Public Member Functions | |
FileList (FileName listFile) | |
Creates a FileList based on a FileName. | |
FileList (std::istream &in) | |
Constructs a FileList from an istream. | |
FileList () | |
Creates an empty FileList obj. | |
~FileList () | |
Destroys the FileList object. | |
void | read (FileName listFile) |
reads in a FileName obj | |
void | read (std::istream &in) |
reads in an istream | |
void | write (FileName outputFileList) |
writes to a FileName obj | |
void | write (std::ostream &out) |
writes to an ostream | |
Internalizes a list of files.
This class reads a list of filenames from a file an internalizes them in a standard template vector of strings. Thus, a file like:
Will be internalized as and accessable as an vector.
Isis::FileList::FileList | ( | FileName | listFile | ) |
Isis::FileList::FileList | ( | std::istream & | in | ) |
|
inline |
Destroys the FileList object.
void Isis::FileList::read | ( | FileName | listFile | ) |
reads in a FileName obj
Opens and loads the list of files from a file.
listFile | Name of the file to open that contains the list of files. |
Isis::iException::Io | - Cannot open file |
References _FILEINFO_, Isis::Message::FileOpen(), Isis::IException::Io, read(), and Isis::IException::User.
Referenced by Isis::Equalization::addHolds(), FileList(), FileList(), Isis::Equalization::loadInputs(), and read().
void Isis::FileList::read | ( | std::istream & | in | ) |
reads in an istream
Loads list of files from a stream.
This takes in a stream and loads a file list from it. The lines in the stream are considered separate entries, and comments are ignored. comments are considered to be any line starting with a '#' or '//', and anything after any whitespace following the first text on the line.
in | An input stream containing a list of files. |
References _FILEINFO_, Isis::IString::Token(), Isis::IString::TrimHead(), Isis::IString::TrimTail(), and Isis::IException::User.
void Isis::FileList::write | ( | FileName | outputFileList | ) |
writes to a FileName obj
Writes a list of files to a file.
outputFileList | The name of the file to create. The method will overwrite any existing files. |
Isis::iException::Io | File could not be created. |
References _FILEINFO_, Isis::Message::FileOpen(), Isis::IException::Io, and write().
Referenced by Isis::Pipeline::Run(), and write().
void Isis::FileList::write | ( | std::ostream & | out | ) |
writes to an ostream
Writes a list of files to a stream.
out | The list will be written to this output stream. |