Fix the boiler plate codes
[platform/framework/native/appfw.git] / src / io / inc / FIo_DirectoryImpl.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file        FIo_DirectoryImpl.h
19  * @brief       This is the header file for the %_DirectoryImpl class.
20  *
21  * This header file contains the declarations of the %_DirectoryImpl class.
22  */
23
24 #ifndef _FIO_INTERNAL_DIRECTORY_IMPL_H_
25 #define _FIO_INTERNAL_DIRECTORY_IMPL_H_
26
27 #include <FIoDirectory.h>
28 #include <FBaseObject.h>
29 #include <FOspConfig.h>
30
31 namespace Tizen { namespace Base
32 {
33 class String;
34 }}
35
36 namespace Tizen { namespace Io
37 {
38
39 class DirEnumerator;
40
41 class _OSP_EXPORT_ _DirectoryImpl
42         : public Tizen::Base::Object
43 {
44
45 public:
46         _DirectoryImpl(void);
47
48         virtual ~_DirectoryImpl(void);
49
50         result Construct(const Tizen::Base::String& dirPath);
51
52         DirEnumerator* ReadN(void);
53
54         static result Create(const Tizen::Base::String& dirPath, bool createParentDirectories = false);
55
56         static result Remove(const Tizen::Base::String& dirPath, bool recursive = false);
57
58         static result Rename(const Tizen::Base::String& orgDirPath, const Tizen::Base::String& newDirPath);
59
60         static _DirectoryImpl* GetInstance(Directory& directory);
61
62         static const _DirectoryImpl* GetInstance(const Directory& directory);
63
64 private:
65         static result RemoveRecursively(char* pDirPath);
66
67         Tizen::Base::String __dirPath;
68         void* __pDir;
69
70         friend class DirEnumerator;
71
72 }; // _DirectoryImpl
73
74 }} // Tizen::Io
75
76 #endif // _FIO_INTERNAL_DIRECTORY_IMPL_H_
77