2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
8 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 * @file FIo_FileUtil.h
19 * @brief This is the header file for the _FileUtil class.
21 * This header file contains the declarations of the %_FileUtil class.
24 #ifndef _FIO_INTERNAL_FILEUTIL_H_
25 #define _FIO_INTERNAL_FILEUTIL_H_
27 #include <FIo_FileImpl.h>
29 namespace Tizen { namespace Io
36 static result Remove(const Tizen::Base::String& filePath);
38 static result Move(const Tizen::Base::String& oldFilePath, const Tizen::Base::String& newFilePath);
40 static result Copy(const Tizen::Base::String& srcFilePath, const Tizen::Base::String& destFilePath, bool failIfExist);
42 static result GetAttributes(const Tizen::Base::String& filePath, Tizen::Io::FileAttributes& attribute);
44 static Tizen::Base::String GetFileName(const Tizen::Base::String& filePath);
46 static Tizen::Base::String GetFileExtension(const Tizen::Base::String& filePath);
48 static bool IsFileExist(const Tizen::Base::String& filePath);
50 static bool IsAppPath(const Tizen::Base::String& filePath);
52 static bool IsMediaPath(const Tizen::Base::String& filePath);
54 static bool IsSystemPath(const Tizen::Base::String& filePath);
56 static bool VerifyFilePath(const Tizen::Base::String& filePath, Tizen::Io::_FilePathType pathType);
58 static bool VerifyFileOpenMode(const Tizen::Base::String& openMode);
60 static result ConvertToSecureFile(const Tizen::Base::String& plainFilePath, const Tizen::Base::String& secureFilePath, const Tizen::Base::ByteBuffer* pKey = null);
66 #endif // _FIO_INTERNAL_FILEUTIL_H_