#ifndef __INC_POS_PDOS_FIB_H
#define __INC_POS_PDOS_FIB_H
/*******************************************************************
 Includes Release 24
 (C) Copyright 1995-1997 proDAD
     All Rights Reserved

 $AUT Holger Burkarth
 $DAT >>FIB.h<<   08 Jan 1997    16:32:27 - (C) ProDAD
*******************************************************************/
#ifndef __INC_POS_PDOS_DOSTYPES_H
#include <pDOS/DosTypes.h>
#endif
#ifndef __INC_POS_PDOS_DATE_H
#include <pDOS/Date.h>
#endif


/*----------------------------------
-----------------------------------*/
struct pOS_FileInfoBlock
{
  ULONG                fib_DiskKey[4];    /* private for the handler */

  UBYTE                fib_DirEntryType;  /* (enum pOS_FileInfoEntryType) */
  UBYTE                fib_Pad;           /* always null */

  dosname_t            fib_FileName[pOS_DosFileName_MAX];
  ULONG                fib_Bits;          /* (enum pOS_FileProtectionBits) */
  dossize_t            fib_Size;          /* Number of bytes in file */
  dossize_t            fib_NumBlocks;     /* Number of blocks in file */
  struct pOS_DateStamp fib_Date;          /* Date file last changed */
  dosname_t            fib_Comment[pOS_DosComment_MAX];

  UWORD  fib_OwnerUID;         /* owner's UID */
  UWORD  fib_OwnerGID;         /* owner's GID */

  UBYTE  fib_Reserved[32];
};


enum pOS_FileInfoEntryType
{
  FINFENTYP_Unknown=0,       /* unknown */
  FINFENTYP_File=   0x01,    /* Bit 0 */
  FINFENTYP_Dir=    0x02,    /* Bit 1 */

  FINFENTYP_FDMask= 0x03,    /* FINFENTYP_File | FINFENTYP_Dir */

  FINFENTYP_HardLink=  0x10 /* is hard-link */
};




/*                       0    5 */
#define pOS_FILEPROTSTR "DEWRAPS--"

enum pOS_FileProtectionBits
{
  FIBB_Delete=    0,        /* d: prevent file from being deleted */
  FIBB_Execute=   1,        /* e: enable execute */
  FIBB_Write=     2,        /* w:  */
  FIBB_Read=      3,        /* r:  */
  FIBB_Archive=   4,        /* a: cleared whenever file is changed */
  FIBB_Pure=      5,        /* p: program is reentrant and rexecutable */
  FIBB_Script=    6,        /* s: program is a script (execute) file */

  FIBB_GRP_Delete=    8,    /* Group: prevent file from being deleted */
  FIBB_GRP_Execute=   9,    /* Group: file is executable */
  FIBB_GRP_Write=     10,   /* Group: file is writable */
  FIBB_GRP_Read=      11,   /* Group: file is readable */
  FIBB_OTR_Delete=    12,   /* Other: prevent file from being deleted */
  FIBB_OTR_Execute=   13,   /* Other: file is executable */
  FIBB_OTR_Write=     14,   /* Other: file is writable */
  FIBB_OTR_Read=      15,   /* Other: file is readable */


  FIBF_RWDE = 0x0f,

  FIBF_Delete=    (1<<FIBB_Delete),
  FIBF_Execute=   (1<<FIBB_Execute),
  FIBF_Write=     (1<<FIBB_Write),
  FIBF_Read=      (1<<FIBB_Read),
  FIBF_Archive=   (1<<FIBB_Archive),
  FIBF_Pure=      (1<<FIBB_Pure),
  FIBF_Script=    (1<<FIBB_Script),

  FIBF_GRP_Delete=    (1<<FIBB_GRP_Delete),
  FIBF_GRP_Execute=   (1<<FIBB_GRP_Execute),
  FIBF_GRP_Write=     (1<<FIBB_GRP_Write),
  FIBF_GRP_Read=      (1<<FIBB_GRP_Read),
  FIBF_OTR_Delete=    (1<<FIBB_OTR_Delete),
  FIBF_OTR_Execute=   (1<<FIBB_OTR_Execute),
  FIBF_OTR_Write=     (1<<FIBB_OTR_Write),
  FIBF_OTR_Read=      (1<<FIBB_OTR_Read)
};



#endif
