OSDN Git Service

(none)
[hos/hos-v4a.git] / aplfw / volume / fat / fatfile_create.c
1
2 #include <stdio.h>
3 #include "fatfile_local.h"
4
5
6 const T_FILEOBJ_METHODS FatFile_FileObjMethods =
7 {
8 /*      { FatFile_Delete },     */      /* デストラクタ */
9         FatFile_IoControl,              /* IoControl */
10         FatFile_Seek,                   /* Seek */
11         FatFile_Read,                   /* Read */
12         FatFile_Write,                  /* Write */
13 };
14
15
16 FILE_ERR FatFile_Create(C_FATFILE *self, C_FATVOL *pFatVol, FATVOL_UINT uiCluster, HANDLE hDir, int iDirEntry, int iMode)
17 {
18         /* 親クラスコンストラクタ呼び出し */
19         FileObj_Create(&self->FileObj, &FatFile_FileObjMethods);
20         
21         /* 初期化 */
22         self->iMode          = iMode;
23         self->pFatVol        = pFatVol;
24         self->uiStartCluster = uiCluster;
25         self->hDir           = hDir;
26         self->iDirEntry      = iDirEntry;
27         
28         /* サイズ取得 */
29         if ( hDir == NULL )
30         {
31                 
32         }
33         
34         /* ファイルポインタ初期化 */
35         self->FilePos          = 0;
36         self->uiCurrentCluster = self->uiStartCluster;
37         
38         
39         return FILE_ERR_OK;
40 }
41
42
43 /* end of file */