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_NormalFile.h
19 * @brief This is the header file for the _NormalFile class.
21 * This header file contains the declarations of the %_NormalFile class.
24 #ifndef _FIO_INTERNAL_NORMALFILE_H_
25 #define _FIO_INTERNAL_NORMALFILE_H_
27 #include <FBaseInternalTypes.h>
28 #include <FBaseString.h>
29 #include <FBaseByteBuffer.h>
30 #include <FBaseDateTime.h>
31 #include <FBaseColIList.h>
32 #include <FBaseResult.h>
35 #include <FIo_FileImpl.h>
36 #include <FIo_IFileCore.h>
38 namespace Tizen { namespace Io
42 : public Tizen::Base::Object
49 result Construct(const Tizen::Base::String& filePath, const char* pOpenMode);
51 virtual ~_NormalFile(void);
53 result Read(Tizen::Base::ByteBuffer& buffer);
55 int Read(void* buffer, int length);
57 result Read(Tizen::Base::String& buffer);
59 result ReadN(char** buffer, int& length);
61 result Write(const Tizen::Base::ByteBuffer& buffer);
63 result Write(const void* buffer, int length);
65 result Write(const Tizen::Base::String& buffer);
71 result Seek(FileSeekPosition position, long offset);
73 result Truncate(int length);
75 Tizen::Base::String GetName(void);
77 virtual FILE* GetFilePointer(void)
83 Tizen::Base::String __filePath;
91 #endif // _FIO_INTERNAL_NORMALFILE_H_