part revert commit 56211
[AROS.git] / tools / adflib / adf_dir.h
blobf8abeb09fe726993baa82fbcfd07f84c6addf6c1
1 #ifndef ADF_DIR_H
2 #define ADF_DIR_H 1
4 /*
5 * ADF Library. (C) 1997-1999 Laurent Clevy
7 * adf_dir.h
9 */
11 #include"adf_str.h"
12 #include"adf_err.h"
13 #include"adf_defs.h"
15 PREFIX RETCODE adfToRootDir(struct Volume *vol);
16 BOOL isDirEmpty(struct bDirBlock *dir);
17 PREFIX RETCODE adfRemoveEntry(struct Volume *vol, SECTNUM pSect, char *name);
18 PREFIX struct List* adfGetDirEnt(struct Volume* vol, SECTNUM nSect );
19 PREFIX struct List* adfGetRDirEnt(struct Volume* vol, SECTNUM nSect, BOOL recurs );
20 PREFIX void adfFreeDirList(struct List* list);
22 RETCODE adfEntBlock2Entry(struct bEntryBlock *entryBlk, struct Entry *entry);
23 PREFIX void adfFreeEntry(struct Entry *entry);
24 RETCODE adfCreateFile(struct Volume* vol, SECTNUM parent, char *name,
25 struct bFileHeaderBlock *fhdr);
26 PREFIX RETCODE adfCreateDir(struct Volume* vol, SECTNUM parent, char* name);
27 SECTNUM adfCreateEntry(struct Volume *vol, struct bEntryBlock *dir, char *name, SECTNUM );
28 PREFIX RETCODE adfRenameEntry(struct Volume *vol, SECTNUM, char *old,SECTNUM,char *new);
31 RETCODE adfReadEntryBlock(struct Volume* vol, SECTNUM nSect, struct bEntryBlock* ent);
32 RETCODE adfWriteDirBlock(struct Volume* vol, SECTNUM nSect, struct bDirBlock *dir);
33 RETCODE adfWriteEntryBlock(struct Volume* vol, SECTNUM nSect, struct bEntryBlock *ent);
35 char* adfAccess2String(ULONG acc);
36 char adfIntlToUpper(char c);
37 int adfGetHashValue(char *name, BOOL intl);
38 void myToUpper( char *ostr, char *nstr, int,BOOL intl );
39 PREFIX RETCODE adfChangeDir(struct Volume* vol, char *name);
40 PREFIX RETCODE adfParentDir(struct Volume* vol);
41 PREFIX RETCODE adfSetEntryAccess(struct Volume*, SECTNUM, char*, ULONG);
42 PREFIX RETCODE adfSetEntryComment(struct Volume*, SECTNUM, char*, char*);
43 SECTNUM adfNameToEntryBlk(struct Volume *vol, ULONG ht[], char* name,
44 struct bEntryBlock *entry, SECTNUM *);
46 PREFIX void printEntry(struct Entry* entry);
47 void adfFreeDirList(struct List* list);
49 #endif /* ADF_DIR_H */