Fix the boiler plate codes
[platform/framework/native/appfw.git] / src / io / inc / FIo_FileUtil.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_FileUtil.h
19  * @brief       This is the header file for the _FileUtil class.
20  *
21  * This header file contains the declarations of the %_FileUtil class.
22  */
23
24 #ifndef _FIO_INTERNAL_FILEUTIL_H_
25 #define _FIO_INTERNAL_FILEUTIL_H_
26
27 #include <FIo_FileImpl.h>
28
29 namespace Tizen { namespace Io
30 {
31
32 class _FileUtil
33 {
34
35 public:
36         static result Remove(const Tizen::Base::String& filePath);
37
38         static result Move(const Tizen::Base::String& oldFilePath, const Tizen::Base::String& newFilePath);
39
40         static result Copy(const Tizen::Base::String& srcFilePath, const Tizen::Base::String& destFilePath, bool failIfExist);
41
42         static result GetAttributes(const Tizen::Base::String& filePath, Tizen::Io::FileAttributes& attribute);
43
44         static Tizen::Base::String GetFileName(const Tizen::Base::String& filePath);
45
46         static Tizen::Base::String GetFileExtension(const Tizen::Base::String& filePath);
47
48         static bool IsFileExist(const Tizen::Base::String& filePath);
49
50         static bool IsAppPath(const Tizen::Base::String& filePath);
51
52         static bool IsMediaPath(const Tizen::Base::String& filePath);
53
54         static bool IsSystemPath(const Tizen::Base::String& filePath);
55
56         static bool VerifyFilePath(const Tizen::Base::String& filePath, Tizen::Io::_FilePathType pathType);
57
58         static bool VerifyFileOpenMode(const Tizen::Base::String& openMode);
59
60         static result ConvertToSecureFile(const Tizen::Base::String& plainFilePath, const Tizen::Base::String& secureFilePath, const Tizen::Base::ByteBuffer* pKey = null);
61
62 }; // _FileUtil
63
64 }} // Tizen::Io
65
66 #endif // _FIO_INTERNAL_FILEUTIL_H_
67