ToolMap
Loading...
Searching...
No Matches
diroperation.h
1/***************************************************************************
2 diroperation.h
3 Super class for dealing with Directory operations
4 -------------------
5 copyright : (C) 2007 CREALP Lucien Schreiber
6 ***************************************************************************/
7
8/***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
17// comment doxygen
18
19#ifndef DIROPERATION_H
20#define DIROPERATION_H
21
22// For compilers that support precompilation, includes "wx/wx.h".
23#include <wx/wxprec.h>
24
25// Include wxWidgets' headers
26#ifndef WX_PRECOMP
27#include <wx/wx.h>
28#endif
29
30#include <wx/dir.h>
31#include <wx/filename.h>
32
33enum DIROP_SELECTDIR {
34 DIROP_PATH_ORIGIN = 0,
35 DIROP_PATH_DESTINATION
36};
37
38/***************************************************************************/
45class DirOperation : public wxObject {
46 DECLARE_DYNAMIC_CLASS(DirOperation)
47
48 protected:
49 wxString m_Path[2];
50 // wxString m_DestinationPath;
51
52 void InitMembers();
53
54 public:
56
57 DirOperation(wxString OriginPath, wxString DestinationPath = _T(""));
58
60
61 void InitPath(wxString OriginPath = _T(""), wxString DestinationPath = _T(""));
62
63 double GetDirectorySize(DIROP_SELECTDIR dirselection = DIROP_PATH_ORIGIN);
64
65 long GetAllDirectoryFiles(wxArrayString& filesNames, DIROP_SELECTDIR dirselection = DIROP_PATH_ORIGIN);
66
67 bool HasEnoughFreeSpace(double megabyteSize, DIROP_SELECTDIR dirselection = DIROP_PATH_ORIGIN);
68
69 bool IsPathWritable(DIROP_SELECTDIR dirselection = DIROP_PATH_DESTINATION);
70
71 bool CopyDirectory(const wxArrayString& filesNames, bool showprogress = FALSE);
72};
73
74#endif
For directory operations (copy, delete...)
Definition diroperation.h:45