ReactOS 0.4.15-dev-7994-gb388cb6
ff_file.h
Go to the documentation of this file.
1/*****************************************************************************
2 * FullFAT - High Performance, Thread-Safe Embedded FAT File-System *
3 * Copyright (C) 2009 James Walmsley (james@worm.me.uk) *
4 * *
5 * This program is free software: you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation, either version 3 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
17 * *
18 * IMPORTANT NOTICE: *
19 * ================= *
20 * Alternative Licensing is available directly from the Copyright holder, *
21 * (James Walmsley). For more information consult LICENSING.TXT to obtain *
22 * a Commercial license. *
23 * *
24 * See RESTRICTIONS.TXT for extra restrictions on the use of FullFAT. *
25 * *
26 * Removing the above notice is illegal and will invalidate this license. *
27 *****************************************************************************
28 * See http://worm.me.uk/fullfat for more information. *
29 * Or http://fullfat.googlecode.com/ for latest releases and the wiki. *
30 *****************************************************************************/
31
37#ifndef _FF_FILE_H_
38#define _FF_FILE_H_
39
40#include "ff_config.h"
41#include "ff_types.h"
42#include "ff_ioman.h"
43#include "ff_dir.h"
44
45#ifdef FF_USE_NATIVE_STDIO
46#include <stdio.h>
47#define FF_SEEK_SET SEEK_SET
48#define FF_SEEK_CUR SEEK_CUR
49#define FF_SEEK_END SEEK_END
50#else
51#define FF_SEEK_SET 1
52#define FF_SEEK_CUR 2
53#define FF_SEEK_END 3
54#endif
55
56typedef struct _FF_FILE {
65 //FF_T_UINT32 AppendPointer; ///< Points to the Append from position. (The original filesize at open).
69 //FF_T_UINT8 NumLFNs; ///< Number of LFNs associated with this file.
71 struct _FF_FILE *Next;
74
75//---------- PROTOTYPES
76// PUBLIC (Interfaces):
77
78#ifdef FF_UNICODE_SUPPORT
83FF_ERROR FF_Move (FF_IOMAN *pIoman, const FF_T_WCHAR *szSourceFile, const FF_T_WCHAR *szDestinationFile);
84#else
89FF_ERROR FF_Move (FF_IOMAN *pIoman, const FF_T_INT8 *szSourceFile, const FF_T_INT8 *szDestinationFile);
90#endif
100
102
103// Private :
104
105#endif
PRTL_UNICODE_STRING_BUFFER Path
struct _FF_FILE * PFF_FILE
FF_T_BOOL FF_isDirEmpty(FF_IOMAN *pIoman, const FF_T_WCHAR *Path)
FF_T_BOOL FF_isEOF(FF_FILE *pFile)
FF_ERROR FF_Move(FF_IOMAN *pIoman, const FF_T_WCHAR *szSourceFile, const FF_T_WCHAR *szDestinationFile)
FF_ERROR FF_RmFile(FF_IOMAN *pIoman, const FF_T_WCHAR *path)
FF_T_SINT32 FF_Read(FF_FILE *pFile, FF_T_UINT32 ElementSize, FF_T_UINT32 Count, FF_T_UINT8 *buffer)
FF_T_SINT32 FF_GetC(FF_FILE *pFile)
FF_ERROR FF_RmDir(FF_IOMAN *pIoman, const FF_T_WCHAR *path)
FF_FILE * FF_Open(FF_IOMAN *pIoman, const FF_T_WCHAR *path, FF_T_UINT8 Mode, FF_ERROR *pError)
FF_T_UINT32 FF_Tell(FF_FILE *pFile)
FF_ERROR FF_Seek(FF_FILE *pFile, FF_T_SINT32 Offset, FF_T_INT8 Origin)
FF_ERROR FF_Close(FF_FILE *pFile)
FF_T_SINT32 FF_GetLine(FF_FILE *pFile, FF_T_INT8 *szLine, FF_T_UINT32 ulLimit)
struct _FF_FILE FF_FILE
FF_T_SINT32 FF_PutC(FF_FILE *pFile, FF_T_UINT8 Value)
FF_T_SINT32 FF_Write(FF_FILE *pFile, FF_T_UINT32 ElementSize, FF_T_UINT32 Count, FF_T_UINT8 *buffer)
FF_T_UINT8 FF_GetModeBits(FF_T_INT8 *Mode)
unsigned char FF_T_UINT8
8 bit unsigned integer.
Definition: ff_types.h:51
signed long FF_T_SINT32
32 bit signed integer.
Definition: ff_types.h:62
wchar_t FF_T_WCHAR
Unicode UTF-16 Charachter type, for FullFAT when UNICODE is enabled.
Definition: ff_types.h:80
unsigned short FF_T_UINT16
16 bit unsigned integer.
Definition: ff_types.h:56
char FF_T_BOOL
This can be a char if your compiler isn't C99.
Definition: ff_types.h:44
unsigned long FF_T_UINT32
32 bit unsigned integer.
Definition: ff_types.h:61
FF_T_SINT32 FF_ERROR
A special error code type to ease some inconsistencies in Error reporting.
Definition: ff_types.h:77
char FF_T_INT8
8 bit default integer.
Definition: ff_types.h:50
MdFileObject pFile
GLuint buffer
Definition: glext.h:5915
_In_ ULONG Mode
Definition: hubbusif.h:303
int Count
Definition: noreturn.cpp:7
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
FF_IOMAN Object. A developer should not touch these values.
Definition: ff_ioman.h:190
FF_T_UINT32 DirCluster
Cluster Number that the Dirent is in.
Definition: ff_file.h:67
FF_T_UINT8 Mode
Mode that File Was opened in.
Definition: ff_file.h:66
FF_T_UINT32 Filesize
File's Size.
Definition: ff_file.h:58
FF_T_UINT32 FilePointer
Current Position Pointer.
Definition: ff_file.h:64
FF_T_UINT32 iChainLength
Total Length of the File's cluster chain.
Definition: ff_file.h:60
FF_T_UINT32 CurrentCluster
Prevents FAT Thrashing.
Definition: ff_file.h:61
FF_T_BOOL FileDeleted
Definition: ff_file.h:70
FF_IOMAN * pIoman
Ioman Pointer!
Definition: ff_file.h:57
FF_T_UINT32 AddrCurrentCluster
Address of the current cluster.
Definition: ff_file.h:62
FF_T_UINT32 ObjectCluster
File's Start Cluster.
Definition: ff_file.h:59
FF_T_UINT32 iEndOfChain
Address of the last cluster in the chain.
Definition: ff_file.h:63
struct _FF_FILE * Next
Pointer to the next file object in the linked list.
Definition: ff_file.h:71
FF_T_UINT16 DirEntry
Dirent Entry Number describing this file.
Definition: ff_file.h:68
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413