add placeholders for storage.resource
[AROS.git] / tools / adflib / adf_file.h
blobeed148a1cffccad10fe76c261f459e863d5e1424
1 #ifndef ADF_FILE_H
2 #define ADF_FILE_H 1
4 /*
5 * ADF Library. (C) 1997-1998 Laurent Clevy
7 * adf_file.h
9 */
11 #include"adf_str.h"
13 RETCODE adfGetFileBlocks(struct Volume* vol, struct bFileHeaderBlock* entry,
14 struct FileBlocks* );
15 RETCODE adfFreeFileBlocks(struct Volume* vol, struct bFileHeaderBlock *entry);
16 PREFIX ULONG adfFileRealSize(ULONG size, int blockSize, ULONG *dataN, ULONG *extN);
18 ULONG adfPos2DataBlock(ULONG pos, int blockSize, int *posInExtBlk, int *posInDataBlk, ULONG *curDataN );
20 RETCODE adfWriteFileHdrBlock(struct Volume *vol, SECTNUM nSect, struct bFileHeaderBlock* fhdr);
22 RETCODE adfReadDataBlock(struct Volume *vol, SECTNUM nSect, void *data);
23 RETCODE adfWriteDataBlock(struct Volume *vol, SECTNUM nSect, void *data);
24 RETCODE adfReadFileExtBlock(struct Volume *vol, SECTNUM nSect, struct bFileExtBlock* fext);
25 RETCODE adfWriteFileExtBlock(struct Volume *vol, SECTNUM nSect, struct bFileExtBlock* fext);
27 PREFIX struct File* adfOpenFile(struct Volume *vol, char* name, char *mode);
28 PREFIX void adfCloseFile(struct File *file);
29 PREFIX ULONG adfReadFile(struct File* file, ULONG n, unsigned char *buffer);
30 PREFIX BOOL adfEndOfFile(struct File* file);
31 RETCODE adfReadNextFileBlock(struct File* file);
32 PREFIX ULONG adfWriteFile(struct File *file, ULONG n, unsigned char *buffer);
33 SECTNUM adfCreateNextFileBlock(struct File* file);
34 PREFIX void adfFlushFile(struct File *file);
38 #endif /* ADF_FILE_H */