home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 6 File
/
06-File.zip
/
ramfs102.zip
/
src
/
fileinfo.c
< prev
next >
Wrap
C/C++ Source or Header
|
2002-09-28
|
932b
|
44 lines
#include "includes.h"
APIRET EXPENTRY FS_FILEINFO (
USHORT flag,
struct sffsi *psffsi,
struct sffsd *psffsd,
USHORT level,
PCHAR pData,
USHORT cbData,
USHORT IOflag ) /* not used */
{
int rc;
POPENFILE pOpenfile;
DIRENTRY Entry;
UtilEnterRamfs();
DEBUG_PRINTF3 ("FS_FILEINFO sfn=%d, flag=%d, level=%d",
psffsi->sfi_selfsfn, flag, level);
pOpenfile = psffsd->pOpenfile;
VMRead (&Entry, pOpenfile->flatEntry, sizeof(Entry)-sizeof(Entry.achName));
if (flag == 0)
{
/* retrieve information */
rc = InfoQuery (pData, cbData, level, &Entry);
}
else
{
/* set information */
rc = InfoSet (pData, cbData, level, &Entry, psffsi);
if (rc == NO_ERROR)
VMWrite (pOpenfile->flatEntry, &Entry, sizeof(Entry)-sizeof(Entry.achName));
}
DEBUG_PRINTF1 (" => %d\r\n", rc);
UtilExitRamfs();
return rc;
}