OpenZWave Library 1.6.0
Loading...
Searching...
No Matches
FileOps.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2//
3// FileOps.h
4//
5// Cross-platform File Operations
6//
7// Copyright (c) 2012 Greg Satz <satz@iranger.com>
8// All rights reserved.
9//
10// SOFTWARE NOTICE AND LICENSE
11//
12// This file is part of OpenZWave.
13//
14// OpenZWave is free software: you can redistribute it and/or modify
15// it under the terms of the GNU Lesser General Public License as published
16// by the Free Software Foundation, either version 3 of the License,
17// or (at your option) any later version.
18//
19// OpenZWave is distributed in the hope that it will be useful,
20// but WITHOUT ANY WARRANTY; without even the implied warranty of
21// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22// GNU Lesser General Public License for more details.
23//
24// You should have received a copy of the GNU Lesser General Public License
25// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
26//
27//-----------------------------------------------------------------------------
28#ifndef _FileOps_H
29#define _FileOps_H
30
31#include <stdarg.h>
32#include <string>
33#include "Defs.h"
34
35namespace OpenZWave
36{
37 class FileOpsImpl;
38
42 class FileOps
43 {
44 public:
50 static FileOps* Create();
51
56 static void Destroy();
57
63 static bool FolderExists( const string &_folderName );
64
70 static bool FileExists( const string &_fileName );
71
77 static bool FileWriteable( const string &_fileName );
78
84 static bool FileRotate( const string &_fileName );
85
92 static bool FileCopy( const string &_fileName, const string &_destinationfile );
93
99 static bool FolderCreate( const string &_folderName);
100
101
102
103 private:
104 FileOps();
105 ~FileOps();
106
107 static FileOpsImpl* m_pImpl; // Pointer to an object that encapsulates the platform-specific implementation of the FileOps.
108 static FileOps* s_instance;
109 };
110
111} // namespace OpenZWave
112
113#endif //_FileOps_H
114
Implements platform-independent File Operations.
Definition: FileOps.h:43
static FileOps * Create()
Definition: FileOps.cpp:49
static void Destroy()
Definition: FileOps.cpp:64
static bool FolderExists(const string &_folderName)
Definition: FileOps.cpp:76
static bool FileWriteable(const string &_fileName)
Definition: FileOps.cpp:110
static bool FileCopy(const string &_fileName, const string &_destinationfile)
Definition: FileOps.cpp:145
static bool FileExists(const string &_fileName)
Definition: FileOps.cpp:93
static bool FileRotate(const string &_fileName)
Definition: FileOps.cpp:127
static bool FolderCreate(const string &_folderName)
Definition: FileOps.cpp:164
Definition: Bitfield.h:35