2011-11-13 00:38:56 +01:00
|
|
|
/* nwfile.h 11-May-96 */
|
2011-11-13 00:38:56 +01:00
|
|
|
#ifndef _NWFILE_H_
|
|
|
|
#define _NWFILE_H_
|
2011-11-13 00:38:56 +01:00
|
|
|
#include "nwqueue.h"
|
2011-11-13 00:38:56 +01:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
int fd; /* filehandle from system open/creat */
|
|
|
|
long offd; /* aktuell file offset */
|
|
|
|
time_t tmodi; /* modification TIME */
|
2011-11-13 00:38:56 +01:00
|
|
|
FILE_PIPE *f; /* for PIPE */
|
2011-11-13 00:38:56 +01:00
|
|
|
int flags; /* 2 = PIPE */
|
|
|
|
/* 4 = don't reuse after close */
|
2011-11-13 00:38:56 +01:00
|
|
|
/* 0x20 = readonly */
|
2011-11-13 00:38:56 +01:00
|
|
|
char fname[256]; /* UNIX filename */
|
|
|
|
} FILE_HANDLE;
|
2011-11-13 00:38:56 +01:00
|
|
|
#define FILE_IS_READONLY 0x20
|
2011-11-13 00:38:56 +01:00
|
|
|
|
|
|
|
extern void init_file_module(void);
|
|
|
|
|
|
|
|
extern int file_creat_open(int volume, uint8 *unixname,
|
|
|
|
struct stat *stbuff,
|
|
|
|
int attrib, int access, int creatmode);
|
|
|
|
|
|
|
|
extern int nw_set_fdate_time(uint32 fhandle, uint8 *datum, uint8 *zeit);
|
|
|
|
|
|
|
|
|
|
|
|
extern int nw_close_datei(int fhandle, int reset_reuse);
|
|
|
|
|
|
|
|
extern uint8 *file_get_unix_name(int fhandle);
|
|
|
|
|
|
|
|
extern int nw_read_datei(int fhandle, uint8 *data, int size, uint32 offset);
|
|
|
|
extern int nw_seek_datei(int fhandle, int modus);
|
|
|
|
extern int nw_write_datei(int fhandle, uint8 *data, int size, uint32 offset);
|
|
|
|
extern int nw_server_copy(int qfhandle, uint32 qoffset,
|
|
|
|
int zfhandle, uint32 zoffset,
|
|
|
|
uint32 size);
|
|
|
|
|
|
|
|
extern int nw_lock_datei(int fhandle, int offset, int size, int do_lock);
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|