RasterFile Class Reference

File path of a raster dataset. See Supported grid/raster formats. More...

#include "RasterFile.hpp"

+ Inheritance diagram for RasterFile:

Public Member Functions

 RasterFile (const Path &)
 
 RasterFile (const RasterFile &)
 
 Path ()
 
 Path (const char *)
 
 Path (const String &)
 
 Path (String &&)
 
 Path (const Path &)
 
 Path (Path &&)
 
- Public Member Functions inherited from Path
 Path (const char *)
 
 Path (const String &)
 
 Path (String &&)
 
 Path (const Path &)
 
 Path (Path &&)
 
void clear ()
 postcondition: this->empty() is true.
 
Pathmake_absolute ()
 postcondition: For the returned path, is_absolute() is true.
 
Pathmake_preferred ()
 Convert the contained pathname to the native format.
 
Pathremove_filename ()
 if has_parent_path() then remove the last filename from the stored path.
 
Pathreplace_extension (const String &new_extension=String())
 postcondition: extension() == new_extension (where a leading dot has been removed from replacement, if present)
 
void swap (Path &)
 swaps the contents of the two paths.
 
String string () const
 returns the stored path, formatted according to the operating system rules for regular file pathnames
 
Path root_name () const
 returns the root name (e.g. d:/path/filename.ext -> d:)
 
Path root_directory () const
 returns the root directory (e.g. d:/path/filename.ext -> /)
 
Path root_path () const
 returns root_name() + root_directory()
 
Path relative_path () const
 returns the stored path without root_path() (e.g. d:/path/file.ext -> path/file.ext)
 
Path parent_path () const
 returns the parent directory, if any (e.g. d:/path/filename.ext -> d:/path/)
 
Path filename () const
 returns the filename (i.e. /path/filename.ext -> filename.ext)
 
String stem () const
 returns the filename without extension (i.e. /path/filename.ext -> filename)
 
String extension () const
 returns the filename extension (i.e. /path/filename.ext -> .ext)
 
bool empty () const
 returns string().empty()
 
bool has_root_name () const
 returns !root_name().empty()
 
bool has_root_directory () const
 returns !root_directory().empty()
 
bool has_root_path () const
 returns !root_path().empty()
 
bool has_relative_path () const
 returns !relative_path().empty()
 
bool has_parent_path () const
 returns !parent_path().empty()
 
bool has_filename () const
 returns !filename().empty()
 
bool has_stem () const
 returns !stem().empty()
 
bool has_extension () const
 returns !extension().empty()
 
bool is_absolute () const
 returns true if the elements of root_path() uniquely identify a directory, else false
 
bool is_relative () const
 returns !is_absolute()
 
Pathnormalize ()
 Replace symlinks, replace '/' with '\', replace "foo/../bar" with "bar", etc.
 
String compressed (size_type length) const
 shorten path to length, e.g. d:/foo_long_directory_name/bar.txt -> d:/foo.../bar.txt
 
Pathoperator= (const char *)
 
Pathoperator= (const String &)
 
Pathoperator= (String &&)
 
Pathoperator= (const Path &)
 
Pathoperator= (Path &&)
 
Pathoperator/= (const char *)
 
Pathoperator/= (const String &)
 
Pathoperator/= (const Path &)
 
Path operator+ (const char *) const
 
Path operator+ (const String &) const
 
Path operator+ (const Path &) const
 
Pathoperator+= (const char *)
 
Pathoperator+= (const String &)
 
Pathoperator+= (const Path &)
 

Static Public Member Functions

static bool exportsPythonType ()
 
static const char * help (bool)
 
static const char * syntax ()
 
static const char * helpCore ()
 
- Static Public Member Functions inherited from CustomOptionType< RasterFile >
static const char * _help (bool forDoxygen)
 get general help on this type
 
static const char * _syntax ()
 get the syntax used for parsing this type
 
static bool _exportsPythonType ()
 returns true if this type is exposed to Python as a custom type, false otherwise (if it is represented as Python-string)
 

Additional Inherited Members

- Public Types inherited from Path
using size_type = String::size_type
 
- Protected Member Functions inherited from CustomOptionType< RasterFile >
 ~CustomOptionType ()
 protected, must be derived from
 

Detailed Description

File path of a raster dataset. See Supported grid/raster formats.