*/
void concat( const std::string& p );
+ /**
+ * Returns a string with the absolute pathname that names the same file, whose
+ * resolution does not involve '.', '..', or symbolic links.
+ */
+ std::string realpath() const;
+
/**
* Get the file part of the path (everything after the last path sep)
* @return file string
std::string dir() const;
/**
- * Get the base part of the path (everything but the extension.)
+ * Get the base part of the path (everything but the final extension.)
* @return the base string
*/
std::string base() const;
mutable time_t _modTime;
};
+/// Output to an ostream
+template<typename char_type, typename traits_type>
+inline
+std::basic_ostream<char_type, traits_type>&
+operator<<(std::basic_ostream<char_type, traits_type>& s, const SGPath& p)
+{ return s << "Path \"" << p.str() << "\""; }
+
/**
* Split a directory string into a list of it's parent directories.