Nut/OS  4.10.3
API Reference
phatfs.h File Reference

PHAT file system. More...

#include <sys/types.h>
#include <sys/file.h>
#include <sys/device.h>
#include <fs/phatdir.h>
#include <fs/phat12.h>
#include <fs/phat16.h>
#include <fs/phat32.h>
Include dependency graph for phatfs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _PHATFILE
 PHAT file descriptor structure. More...


#define PHATEOC   0x0FFFFFF8
 Marks end of cluster chain.


typedef struct _PHATFILE PHATFILE
 PHAT file descriptor structure.


uint32_t AllocFirstCluster (NUTFILE *nfp)
 Allocate the first cluster of a file.
NUTFILEPhatFileOpen (NUTDEVICE *dev, CONST char *path, int mode, int acc)
 Open a file.
int PhatFileClose (NUTFILE *nfp)
 Close a file.
int PhatFileWrite (NUTFILE *nfp, CONST void *buffer, int len)
 Write data to a file.
int PhatFileWrite_P (NUTFILE *nfp, PGM_P buffer, int len)
 Write data from program space to a file.
int PhatFileRead (NUTFILE *nfp, void *buffer, int size)
 Read data from a file.


 PHAT file system driver information structure.

File attributes.

#define PHAT_FATTR_RDONLY   0x01
#define PHAT_FATTR_HIDDEN   0x02
#define PHAT_FATTR_SYSTEM   0x04
#define PHAT_FATTR_VOLID   0x08
#define PHAT_FATTR_DIR   0x10
#define PHAT_FATTR_ARCHIV   0x20
#define PHAT_FATTR_FILEMASK   0x37

Detailed Description

PHAT file system.

 * $Log$
 * Revision 1.8  2009/01/17 11:26:47  haraldkipp
 * Getting rid of two remaining BSD types in favor of stdint.
 * Replaced 'u_int' by 'unsinged int' and 'uptr_t' by 'uintptr_t'.
 * Revision 1.7  2008/08/11 07:00:19  haraldkipp
 * BSD types replaced by stdint types (feature request #1282721).
 * Revision 1.6  2007/08/29 07:43:54  haraldkipp
 * Documentation updated and corrected.
 * Revision 1.5  2006/10/08 16:42:56  haraldkipp
 * Not optimal, but simple and reliable exclusive access implemented.
 * Fixes bug #1486539. Furthermore, bug #1567790, which had been rejected,
 * had been reported correctly and is now fixed.
 * Revision 1.4  2006/06/18 16:42:50  haraldkipp
 * Support for long filenames (VFAT) added.
 * Revision 1.3  2006/05/15 11:48:38  haraldkipp
 * Added a second PHAT file system instance.
 * Revision 1.2  2006/01/22 17:44:20  haraldkipp
 * ICCAVR failed to find local header files.
 * Revision 1.1  2006/01/05 16:32:57  haraldkipp
 * First check-in.

Definition in file phatfs.h.