ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

ff_file.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002  *  FullFAT - High Performance, Thread-Safe Embedded FAT File-System         *
00003  *  Copyright (C) 2009  James Walmsley (james@worm.me.uk)                    *
00004  *                                                                           *
00005  *  This program is free software: you can redistribute it and/or modify     *
00006  *  it under the terms of the GNU General Public License as published by     *
00007  *  the Free Software Foundation, either version 3 of the License, or        *
00008  *  (at your option) any later version.                                      *
00009  *                                                                           *
00010  *  This program is distributed in the hope that it will be useful,          *
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of           *
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            *
00013  *  GNU General Public License for more details.                             *
00014  *                                                                           *
00015  *  You should have received a copy of the GNU General Public License        *
00016  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.    *
00017  *                                                                           *
00018  *  IMPORTANT NOTICE:                                                        *
00019  *  =================                                                        *
00020  *  Alternative Licensing is available directly from the Copyright holder,   *
00021  *  (James Walmsley). For more information consult LICENSING.TXT to obtain   *
00022  *  a Commercial license.                                                    *
00023  *                                                                           *
00024  *  See RESTRICTIONS.TXT for extra restrictions on the use of FullFAT.       *
00025  *                                                                           *
00026  *  Removing the above notice is illegal and will invalidate this license.   *
00027  *****************************************************************************
00028  *  See http://worm.me.uk/fullfat for more information.                      *
00029  *  Or  http://fullfat.googlecode.com/ for latest releases and the wiki.     *
00030  *****************************************************************************/
00031 
00037 #ifndef _FF_FILE_H_
00038 #define _FF_FILE_H_
00039 
00040 #include "ff_config.h"
00041 #include "ff_types.h"
00042 #include "ff_ioman.h"
00043 #include "ff_dir.h"
00044 
00045 #ifdef FF_USE_NATIVE_STDIO
00046 #include <stdio.h>
00047 #define FF_SEEK_SET SEEK_SET
00048 #define FF_SEEK_CUR SEEK_CUR
00049 #define FF_SEEK_END SEEK_END
00050 #else
00051 #define FF_SEEK_SET 1
00052 #define FF_SEEK_CUR 2
00053 #define FF_SEEK_END 3
00054 #endif
00055 
00056 typedef struct _FF_FILE {
00057     FF_IOMAN        *pIoman;            
00058     FF_T_UINT32      Filesize;          
00059     FF_T_UINT32      ObjectCluster;     
00060     FF_T_UINT32      iChainLength;      
00061     FF_T_UINT32      CurrentCluster;    
00062     FF_T_UINT32      AddrCurrentCluster;
00063     FF_T_UINT32      iEndOfChain;       
00064     FF_T_UINT32      FilePointer;       
00065     //FF_T_UINT32    AppendPointer;     ///< Points to the Append from position. (The original filesize at open).
00066     FF_T_UINT8       Mode;              
00067     FF_T_UINT32      DirCluster;        
00068     FF_T_UINT16      DirEntry;          
00069     //FF_T_UINT8         NumLFNs;           ///< Number of LFNs associated with this file.
00070     FF_T_BOOL        FileDeleted;
00071     struct _FF_FILE *Next;              
00072 } FF_FILE,
00073 *PFF_FILE;
00074 
00075 //---------- PROTOTYPES
00076 // PUBLIC (Interfaces):
00077 
00078 #ifdef FF_UNICODE_SUPPORT
00079 FF_FILE *FF_Open(FF_IOMAN *pIoman, const FF_T_WCHAR *path, FF_T_UINT8 Mode, FF_ERROR *pError);
00080 FF_T_BOOL    FF_isDirEmpty  (FF_IOMAN *pIoman, const FF_T_WCHAR *Path);
00081 FF_ERROR     FF_RmFile      (FF_IOMAN *pIoman, const FF_T_WCHAR *path);
00082 FF_ERROR     FF_RmDir       (FF_IOMAN *pIoman, const FF_T_WCHAR *path);
00083 FF_ERROR     FF_Move        (FF_IOMAN *pIoman, const FF_T_WCHAR *szSourceFile, const FF_T_WCHAR *szDestinationFile);
00084 #else
00085 FF_FILE *FF_Open(FF_IOMAN *pIoman, const FF_T_INT8 *path, FF_T_UINT8 Mode, FF_ERROR *pError);
00086 FF_T_BOOL    FF_isDirEmpty  (FF_IOMAN *pIoman, const FF_T_INT8 *Path);
00087 FF_ERROR     FF_RmFile      (FF_IOMAN *pIoman, const FF_T_INT8 *path);
00088 FF_ERROR     FF_RmDir       (FF_IOMAN *pIoman, const FF_T_INT8 *path);
00089 FF_ERROR     FF_Move        (FF_IOMAN *pIoman, const FF_T_INT8 *szSourceFile, const FF_T_INT8 *szDestinationFile);
00090 #endif
00091 FF_ERROR     FF_Close       (FF_FILE *pFile);
00092 FF_T_SINT32  FF_GetC        (FF_FILE *pFile);
00093 FF_T_SINT32  FF_GetLine     (FF_FILE *pFile, FF_T_INT8 *szLine, FF_T_UINT32 ulLimit);
00094 FF_T_SINT32  FF_Read        (FF_FILE *pFile, FF_T_UINT32 ElementSize, FF_T_UINT32 Count, FF_T_UINT8 *buffer);
00095 FF_T_SINT32  FF_Write       (FF_FILE *pFile, FF_T_UINT32 ElementSize, FF_T_UINT32 Count, FF_T_UINT8 *buffer);
00096 FF_T_BOOL    FF_isEOF       (FF_FILE *pFile);
00097 FF_ERROR     FF_Seek        (FF_FILE *pFile, FF_T_SINT32 Offset, FF_T_INT8 Origin);
00098 FF_T_SINT32  FF_PutC        (FF_FILE *pFile, FF_T_UINT8 Value);
00099 FF_T_UINT32  FF_Tell        (FF_FILE *pFile);
00100 
00101 FF_T_UINT8   FF_GetModeBits (FF_T_INT8 *Mode);
00102 
00103 // Private :
00104 
00105 #endif

Generated on Thu May 24 2012 04:33:34 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.