2#ifndef _aspose_system_io_path_h_
3#define _aspose_system_io_path_h_
5#include <system/exceptions.h>
6#include <system/array.h>
7#include <system/string.h>
9#ifdef GetCurrentDirectory
10#pragma message("!!! GetCurrentDirectory defined, please do not include windows.h manually")
11#undef GetCurrentDirectory
12#undef SetCurrentDirectory
15namespace boost {
namespace filesystem {
19namespace System {
namespace IO {
160 static ASPOSECPP_SHARED_API
String ToString(
const boost::filesystem::path& path);
164 static ASPOSECPP_SHARED_API boost::filesystem::path
ToBoost(
const String& path);
178 static bool HasInvalidChars(
const String& path);
192 static bool IsDSC(char_t ch);
199 static bool IsSeparatorChar(char_t ch);
204 static String NormalizePath_(boost::filesystem::path path);
209 static ASPOSECPP_SHARED_API
String GetFileNameNoCheck(
const String& path);
214 static ASPOSECPP_SHARED_API
String GetFullPathNoCheck(
const String& path);
Contains methods for manipulating directories. This is a static type with no instance services....
Definition: directory.h:58
Provides methods for manipulating paths. This is a static type with no instance services....
Definition: path.h:53
static bool HasExtension(const String &path)
Determines if the specified path references a file with extension.
static String Combine(const String &path1, const String &path2, const String &path3, const String &path4)
Combines four specified path segments into a single path inserting directory separator characters bet...
static String Combine(const ArrayPtr< String > &paths)
Combines the specified path segments into a single path inserting directory separator characters betw...
static void CheckPath(const String &path, const String &msg=s_msg_path, bool allow_empty=true)
Determines if the specified path is valid by checking if it contains invalid characters....
static ArrayPtr< char_t > GetInvalidPathChars()
Returns an array containing characters that are not allowed in path names.
static String GetRandomFileName()
Returns a randomly generated file name.
static const char_t DirectorySeparatorChar
A character used to separate directory levels in a path.
Definition: path.h:142
static String Combine(const String &path1, const String &path2, const String &path3)
Combines three specified path segments into a single path inserting directory separator characters be...
static String GetTempPath()
Returns the path of the current user's temporary directory.
static ArrayPtr< char_t > GetInvalidFileNameChars()
Returns an array containing characters that are not allowed in the names of files.
static String GetFullPath(const String &path)
Converts the specified path into absolute path.
static String GetDirectoryName(const String &path)
Returns the name of the directory referenced by the specified path.
static const char_t VolumeSeparatorChar
A volume separator character.
Definition: path.h:146
static String GetFileName(const String &path)
Returns the name of the file referenced by the specified path.
static const char_t AltDirectorySeparatorChar
An alternate character used to separate directory levels in a path.
Definition: path.h:140
static const char_t PathSeparator
A separator character used to separate path strings in environment variables.
Definition: path.h:144
static String ChangeExtension(const String &path, const String &extension)
Changes the extension in the specified file path.
static String GetTempFileName_()
Creates a new file with a unique name and returns a full path to it.
static String NormalizePath(const String &path)
Normalizes the specified path.
static bool IsPathRooted(const String &path)
Determines if the specified path contains a root.
static String GetTempFileNameSafe()
Creates a new file with a unique name and returns a full path to it. Is a synonym of GetTempFileName_...
static String ToString(const boost::filesystem::path &path)
Returns a string representation of the specified Boost's path object.
static const String s_msg_path
Default parameter name for CheckPath function.
Definition: path.h:172
static String GetPathRoot(const String &path)
Returns the root directory of the specified path.
static String GetExtension(const String &path)
Returns the extension of the file referenced by the specified path.
static boost::filesystem::path ToBoost(const String &path)
Returns an instance of boost::filesystem::path class that represents the specified path.
static String Combine(const String &path1, const String &path2)
Combines two specified path segments into a single path inserting directory separator character betwe...
static String GetFileNameWithoutExtension(const String &path)
Returns the name without extension of the file referenced by the specified path.
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
@ Directory
The filesystem entity is a directory.
Definition: db_command.h:9