Merge "Remove build warning and add temporary getter of privacy name" into tizen_2.1
[platform/framework/native/appfw.git] / src / io / inc / FIo_FileUtil.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file        FIo_FileUtil.h
20  * @brief       This is the header file for the _FileUtil class.
21  *
22  * This header file contains the declarations of the %_FileUtil class.
23  */
24
25 #ifndef _FIO_INTERNAL_FILEUTIL_H_
26 #define _FIO_INTERNAL_FILEUTIL_H_
27
28 #include <FIo_FileImpl.h>
29
30 namespace Tizen { namespace Io
31 {
32
33 class _FileUtil
34 {
35
36 public:
37         static result Remove(const Tizen::Base::String& filePath);
38
39         static result Move(const Tizen::Base::String& oldFilePath, const Tizen::Base::String& newFilePath);
40
41         static result Copy(const Tizen::Base::String& srcFilePath, const Tizen::Base::String& destFilePath, bool failIfExist);
42
43         static result GetAttributes(const Tizen::Base::String& filePath, Tizen::Io::FileAttributes& attribute);
44
45         static Tizen::Base::String GetFileName(const Tizen::Base::String& filePath);
46
47         static Tizen::Base::String GetFileExtension(const Tizen::Base::String& filePath);
48
49         static bool IsFileExist(const Tizen::Base::String& filePath);
50
51         static bool IsAppPath(const Tizen::Base::String& filePath);
52
53         static bool IsMediaPath(const Tizen::Base::String& filePath);
54
55         static bool IsSystemPath(const Tizen::Base::String& filePath);
56
57         static bool VerifyFilePath(const Tizen::Base::String& filePath, Tizen::Io::_FilePathType pathType);
58
59         static bool VerifyFileOpenMode(const Tizen::Base::String& openMode);
60
61         static result ConvertToSecureFile(const Tizen::Base::String& plainFilePath, const Tizen::Base::String& secureFilePath, const Tizen::Base::ByteBuffer* pKey = null);
62
63 }; // _FileUtil
64
65 }} // Tizen::Io
66
67 #endif // _FIO_INTERNAL_FILEUTIL_H_
68