compilation fixes for wxUSE_LONGLONG==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -146,8 +146,10 @@ public:
|
||||
const wxString& filespec,
|
||||
int flags = wxDIR_DEFAULT);
|
||||
|
||||
#if wxUSE_LONGLONG
|
||||
// returns the size of all directories recursively found in given path
|
||||
static wxULongLong GetTotalSize(const wxString &dir, wxArrayString *filesSkipped = NULL);
|
||||
#endif // wxUSE_LONGLONG
|
||||
|
||||
private:
|
||||
friend class wxDirData;
|
||||
|
@@ -84,8 +84,10 @@ enum
|
||||
wxPATH_MKDIR_FULL = 0x0001 // create directories recursively
|
||||
};
|
||||
|
||||
#if wxUSE_LONGLONG
|
||||
// error code of wxFileName::GetSize()
|
||||
extern wxULongLong wxInvalidSize;
|
||||
#endif // wxUSE_LONGLONG
|
||||
|
||||
|
||||
|
||||
@@ -483,6 +485,7 @@ public:
|
||||
|
||||
// Filesize
|
||||
|
||||
#if wxUSE_LONGLONG
|
||||
// returns the size of the given filename
|
||||
wxULongLong GetSize() const;
|
||||
static wxULongLong GetSize(const wxString &file);
|
||||
@@ -493,6 +496,7 @@ public:
|
||||
static wxString GetHumanReadableSize(const wxULongLong &sz,
|
||||
const wxString &nullsize = wxGetTranslation(_T("Not available")),
|
||||
int precision = 1);
|
||||
#endif // wxUSE_LONGLONG
|
||||
|
||||
|
||||
// deprecated methods, don't use any more
|
||||
|
@@ -291,6 +291,8 @@ wxString wxDir::FindFirst(const wxString& dirname,
|
||||
// wxDir::GetTotalSize()
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_LONGLONG
|
||||
|
||||
class wxDirTraverserSumSize : public wxDirTraverser
|
||||
{
|
||||
public:
|
||||
@@ -355,3 +357,4 @@ wxULongLong wxDir::GetTotalSize(const wxString &dirname, wxArrayString *filesSki
|
||||
return traverser.GetTotalSize();
|
||||
}
|
||||
|
||||
#endif // wxUSE_LONGLONG
|
||||
|
@@ -139,7 +139,9 @@
|
||||
#endif
|
||||
|
||||
|
||||
#if wxUSE_LONGLONG
|
||||
wxULongLong wxInvalidSize = (unsigned)-1;
|
||||
#endif // wxUSE_LONGLONG
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -2317,6 +2319,8 @@ bool wxFileName::GetTimes(wxDateTime *dtAccess,
|
||||
// file size functions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_LONGLONG
|
||||
|
||||
/* static */
|
||||
wxULongLong wxFileName::GetSize(const wxString &filename)
|
||||
{
|
||||
@@ -2385,6 +2389,7 @@ wxString wxFileName::GetHumanReadableSize(const wxString &failmsg, int precision
|
||||
return GetHumanReadableSize(GetSize(), failmsg, precision);
|
||||
}
|
||||
|
||||
#endif // wxUSE_LONGLONG
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Mac-specific functions
|
||||
|
Reference in New Issue
Block a user