xtd 0.2.0
environment_current_directory.cpp

Shows how to use xtd::environment::current_directory method.

#include <xtd/io/path>
#include <xtd/console>
#include <xtd/environment>
using namespace xtd;
using namespace xtd::io;
auto main() -> int {
console::write_line("Directory entry: " + path::get_full_path("."));
}
// This code produces the following output :
//
// Directory entry: /!---OMITTED---!/Desktop
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
@ desktop
The logical Desktop rather than the physical file system location.
Definition environment.hpp:149
static xtd::string get_folder_path(environment::special_folder folder)
Gets the path to the system special folder that is identified by the specified enumeration.
Definition environment.hpp:613
static xtd::string current_directory()
Gets the fully qualified path of the current working directory.
static xtd::string get_full_path(const xtd::string &path)
Returns the absolute path for the specified path string.
The xtd::io namespace contains types that allow reading and writing to files and data streams,...
Definition binary_reader.hpp:17
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8