~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbms/src/cslib/CSPath.h

  • Committer: lbieber
  • Date: 2010-10-01 12:16:18 UTC
  • mfrom: (1802.1.1 fix-bug-651256)
  • Revision ID: lbieber@orisndriz08-20101001121618-uqcboygpjwbiglem
Merge Vijay - fix bug 651256 - Remove --help-extended

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2008 PrimeBase Technologies GmbH, Germany
 
1
/* Copyright (c) 2008 PrimeBase Technologies GmbH, Germany
2
2
 *
3
3
 * PrimeBase Media Stream for MySQL
4
4
 *
14
14
 *
15
15
 * You should have received a copy of the GNU General Public License
16
16
 * along with this program; if not, write to the Free Software
17
 
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
18
 *
19
19
 * Original author: Paul McCullagh
20
20
 * Continued development: Barry Leslie
37
37
#include "CSTime.h"
38
38
#include "CSDefs.h"
39
39
#include "CSString.h"
40
 
#include "CSSys.h"
 
40
 
 
41
using namespace std;
41
42
 
42
43
class CSFile;
43
44
class CSDirectory;
44
45
 
45
 
class CSPath : public CSRefObject, public CSSys {
 
46
class CSPath : public CSRefObject {
46
47
public:
47
48
        virtual CSFile *createFile(int mode);
48
49
 
64
65
        /* Delete the contents of a directory */
65
66
        virtual void emptyDir();
66
67
        
67
 
        /* Recursively delete the contents of a directory */
68
 
        virtual void emptyPath();
69
 
        
70
68
        /* Copy a file or directory to the specified location. */
71
69
        virtual void copyTo(CSPath *to_path, bool overwrite);
72
70
 
78
76
        virtual void remove();
79
77
 
80
78
        /* Create an empty file. */
81
 
        virtual void touch(bool create_path = false);
 
79
        virtual void touch(bool create_path);
82
80
 
83
81
        virtual CSString *getString();
84
82
 
94
92
 
95
93
        virtual bool exists() { return exists(NULL); }
96
94
 
97
 
        static void info(const char *path, bool *is_dir, off64_t *size, CSTime *mod_time);
98
 
 
99
95
        virtual void info(bool *is_dir, off64_t *size, CSTime *mod_time);
100
96
 
101
 
        static off64_t getSize(const char *path);
102
 
        
103
 
        virtual off64_t getSize();
 
97
        virtual off64_t getSize();
104
98
 
105
99
        virtual bool isDir();
106
100
 
143
137
        static CSPath *newPath(const char *cwd, const char *path);
144
138
 
145
139
private:
146
 
        CSFile *try_CreateAndOpen(CSThread *self, int mode, bool retry);
147
 
        static CSLock iRename_lock;
148
140
        CSPath():iPath(NULL) { }
149
141
 
150
142
        virtual ~CSPath();