2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
19 * @file FIo_FileUtil.h
20 * @brief This is the header file for the _FileUtil class.
22 * This header file contains the declarations of the %_FileUtil class.
25 #ifndef _FIO_INTERNAL_FILEUTIL_H_
26 #define _FIO_INTERNAL_FILEUTIL_H_
28 #include <FIo_FileImpl.h>
30 namespace Tizen { namespace Io
37 static result Remove(const Tizen::Base::String& filePath);
39 static result Move(const Tizen::Base::String& oldFilePath, const Tizen::Base::String& newFilePath);
41 static result Copy(const Tizen::Base::String& srcFilePath, const Tizen::Base::String& destFilePath, bool failIfExist);
43 static result GetAttributes(const Tizen::Base::String& filePath, Tizen::Io::FileAttributes& attribute);
45 static Tizen::Base::String GetFileName(const Tizen::Base::String& filePath);
47 static Tizen::Base::String GetFileExtension(const Tizen::Base::String& filePath);
49 static bool IsFileExist(const Tizen::Base::String& filePath);
51 static bool IsAppPath(const Tizen::Base::String& filePath);
53 static bool IsMediaPath(const Tizen::Base::String& filePath);
55 static bool IsSystemPath(const Tizen::Base::String& filePath);
57 static bool VerifyFilePath(const Tizen::Base::String& filePath, Tizen::Io::_FilePathType pathType);
59 static bool VerifyFileOpenMode(const Tizen::Base::String& openMode);
61 static result ConvertToSecureFile(const Tizen::Base::String& plainFilePath, const Tizen::Base::String& secureFilePath, const Tizen::Base::ByteBuffer* pKey = null);
67 #endif // _FIO_INTERNAL_FILEUTIL_H_