An object to help track locations of files in the file system.
More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/sina/core/File.hpp>
An object to help track locations of files in the file system.
A File tracks the location (URI) and mimetype of a file on the file system, plus any tags. In the Sina schema, a File always belongs to a Record or one of Record's inheriting types.
Every File must have a URI, while mimetype and tags are optional.
myOtherFile.
setTags({
"these",
"are",
"tags"});
myRecord->add(myFile);
myRecord->add(myOtherFile);
An object to help track locations of files in the file system.
Definition: File.hpp:47
void setTags(std::vector< std::string > tags)
Set the File's tags.
void setMimeType(std::string mimeType)
Set the File's MIME type.
◆ File() [1/2]
| axom::sina::File::File |
( |
std::string |
uri | ) |
|
|
explicit |
Construct a new File.
- Parameters
-
| uri | the location of the file |
◆ File() [2/2]
| axom::sina::File::File |
( |
std::string |
uri, |
|
|
conduit::Node const & |
asNode |
|
) |
| |
Construct a new File.
- Parameters
-
| uri | the uri for a file |
| asNode | the Node representation of the file's additional info |
◆ getUri()
| std::string const& axom::sina::File::getUri |
( |
| ) |
const |
|
inlinenoexcept |
Get the File's URI.
- Returns
- the URI
◆ getMimeType()
| std::string const& axom::sina::File::getMimeType |
( |
| ) |
const |
|
inlinenoexcept |
Get the File's MIME type.
- Returns
- the MIME type
◆ getTags()
| std::vector<std::string> const& axom::sina::File::getTags |
( |
| ) |
const |
|
inlinenoexcept |
Get the File's tags.
- Returns
- the tags
◆ setMimeType()
| void axom::sina::File::setMimeType |
( |
std::string |
mimeType | ) |
|
Set the File's MIME type.
- Parameters
-
◆ setTags()
| void axom::sina::File::setTags |
( |
std::vector< std::string > |
tags | ) |
|
Set the File's tags.
- Parameters
-
◆ toNode()
| conduit::Node axom::sina::File::toNode |
( |
| ) |
const |
Convert this File to its conduit Node representation.
- Returns
- the File in its Node representation
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/sina/core/File.hpp