|
@@ -20,6 +20,7 @@
|
|
|
#include "typeHandle.h"
|
|
#include "typeHandle.h"
|
|
|
#include "register_type.h"
|
|
#include "register_type.h"
|
|
|
#include "vector_string.h"
|
|
#include "vector_string.h"
|
|
|
|
|
+#include "textEncoder.h"
|
|
|
|
|
|
|
|
#include <assert.h>
|
|
#include <assert.h>
|
|
|
|
|
|
|
@@ -61,6 +62,7 @@ public:
|
|
|
|
|
|
|
|
PUBLISHED:
|
|
PUBLISHED:
|
|
|
INLINE Filename(const string &filename = "");
|
|
INLINE Filename(const string &filename = "");
|
|
|
|
|
+ INLINE Filename(const wstring &filename);
|
|
|
INLINE Filename(const char *filename);
|
|
INLINE Filename(const char *filename);
|
|
|
INLINE Filename(const Filename ©);
|
|
INLINE Filename(const Filename ©);
|
|
|
Filename(const Filename &dirname, const Filename &basename);
|
|
Filename(const Filename &dirname, const Filename &basename);
|
|
@@ -82,6 +84,8 @@ PUBLISHED:
|
|
|
|
|
|
|
|
static Filename from_os_specific(const string &os_specific,
|
|
static Filename from_os_specific(const string &os_specific,
|
|
|
Type type = T_general);
|
|
Type type = T_general);
|
|
|
|
|
+ static Filename from_os_specific_w(const wstring &os_specific,
|
|
|
|
|
+ Type type = T_general);
|
|
|
static Filename expand_from(const string &user_string,
|
|
static Filename expand_from(const string &user_string,
|
|
|
Type type = T_general);
|
|
Type type = T_general);
|
|
|
static Filename temporary(const string &dirname, const string &prefix,
|
|
static Filename temporary(const string &dirname, const string &prefix,
|
|
@@ -95,6 +99,7 @@ PUBLISHED:
|
|
|
|
|
|
|
|
// Assignment is via the = operator.
|
|
// Assignment is via the = operator.
|
|
|
INLINE Filename &operator = (const string &filename);
|
|
INLINE Filename &operator = (const string &filename);
|
|
|
|
|
+ INLINE Filename &operator = (const wstring &filename);
|
|
|
INLINE Filename &operator = (const char *filename);
|
|
INLINE Filename &operator = (const char *filename);
|
|
|
INLINE Filename &operator = (const Filename ©);
|
|
INLINE Filename &operator = (const Filename ©);
|
|
|
|
|
|
|
@@ -111,6 +116,7 @@ PUBLISHED:
|
|
|
|
|
|
|
|
// Or, you can use any of these.
|
|
// Or, you can use any of these.
|
|
|
INLINE string get_fullpath() const;
|
|
INLINE string get_fullpath() const;
|
|
|
|
|
+ INLINE wstring get_fullpath_w() const;
|
|
|
INLINE string get_dirname() const;
|
|
INLINE string get_dirname() const;
|
|
|
INLINE string get_basename() const;
|
|
INLINE string get_basename() const;
|
|
|
INLINE string get_fullpath_wo_extension() const;
|
|
INLINE string get_fullpath_wo_extension() const;
|
|
@@ -161,6 +167,7 @@ PUBLISHED:
|
|
|
bool make_true_case();
|
|
bool make_true_case();
|
|
|
|
|
|
|
|
string to_os_specific() const;
|
|
string to_os_specific() const;
|
|
|
|
|
+ wstring to_os_specific_w() const;
|
|
|
string to_os_generic() const;
|
|
string to_os_generic() const;
|
|
|
string to_os_short_name() const;
|
|
string to_os_short_name() const;
|
|
|
string to_os_long_name() const;
|
|
string to_os_long_name() const;
|
|
@@ -220,6 +227,9 @@ PUBLISHED:
|
|
|
|
|
|
|
|
INLINE void output(ostream &out) const;
|
|
INLINE void output(ostream &out) const;
|
|
|
|
|
|
|
|
|
|
+ INLINE static void set_filesystem_encoding(TextEncoder::Encoding encoding);
|
|
|
|
|
+ INLINE static TextEncoder::Encoding get_filesystem_encoding();
|
|
|
|
|
+
|
|
|
public:
|
|
public:
|
|
|
bool atomic_compare_and_exchange_contents(string &orig_contents, const string &old_contents, const string &new_contents) const;
|
|
bool atomic_compare_and_exchange_contents(string &orig_contents, const string &old_contents, const string &new_contents) const;
|
|
|
bool atomic_read_contents(string &contents) const;
|
|
bool atomic_read_contents(string &contents) const;
|
|
@@ -244,6 +254,7 @@ protected:
|
|
|
|
|
|
|
|
int _flags;
|
|
int _flags;
|
|
|
|
|
|
|
|
|
|
+ static TextEncoder::Encoding _filesystem_encoding;
|
|
|
static Filename *_home_directory;
|
|
static Filename *_home_directory;
|
|
|
static Filename *_temp_directory;
|
|
static Filename *_temp_directory;
|
|
|
static Filename *_user_appdata_directory;
|
|
static Filename *_user_appdata_directory;
|