]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/filename.h
Refactored validation of numeric properties (wxIntProperty, wxUIntProperty and wxFloa...
[wxWidgets.git] / include / wx / filename.h
index 7bb7a09460929f07a222a943f473c9d2d570033f..8f9de3bb3a3f51b2c5fa8de1387ce985f009f96f 100644 (file)
@@ -65,6 +65,14 @@ enum wxPathFormat
     wxPATH_MAX // Not a valid value for specifying path format
 };
 
+// different conventions that may be used with GetHumanReadableSize()
+enum wxSizeConvention
+{
+    wxSIZE_CONV_TRADITIONAL,  // 1024 bytes = 1 KB
+    wxSIZE_CONV_IEC,          // 1024 bytes = 1 KiB
+    wxSIZE_CONV_SI            // 1000 bytes = 1 KB
+};
+
 // the kind of normalization to do with the file name: these values can be
 // or'd together to perform several operations at once
 enum wxPathNormalize
@@ -433,6 +441,11 @@ public:
     // is the char a path separator for this format?
     static bool IsPathSeparator(wxChar ch, wxPathFormat format = wxPATH_NATIVE);
 
+    // is this is a DOS path which beings with a windows unique volume name
+    // ('\\?\Volume{guid}\')?
+    static bool IsMSWUniqueVolumeNamePath(const wxString& path,
+                                          wxPathFormat format = wxPATH_NATIVE);
+
     // Dir accessors
     size_t GetDirCount() const { return m_dirs.size(); }
     void AppendDir(const wxString& dir);
@@ -535,11 +548,15 @@ public:
     static wxULongLong GetSize(const wxString &file);
 
         // returns the size in a human readable form
-    wxString GetHumanReadableSize(const wxString &nullsize = wxGetTranslation(wxT("Not available")),
-                                  int precision = 1) const;
-    static wxString GetHumanReadableSize(const wxULongLong &sz,
-                                         const wxString &nullsize = wxGetTranslation(wxT("Not available")),
-                                         int precision = 1);
+    wxString
+    GetHumanReadableSize(const wxString& nullsize = _("Not available"),
+                         int precision = 1,
+                         wxSizeConvention conv = wxSIZE_CONV_TRADITIONAL) const;
+    static wxString
+    GetHumanReadableSize(const wxULongLong& sz,
+                         const wxString& nullsize = _("Not available"),
+                         int precision = 1,
+                         wxSizeConvention conv = wxSIZE_CONV_TRADITIONAL);
 #endif // wxUSE_LONGLONG