2 * File handling declarations
4 * Copyright 1996 Alexandre Julliard
10 #include <time.h> /* time_t */
13 #define MAX_PATHNAME_LEN 1024
15 /* Definition of a full DOS file name */
18 char long_name
[MAX_PATHNAME_LEN
]; /* Long pathname in Unix format */
19 char short_name
[MAX_PATHNAME_LEN
]; /* Short pathname in DOS 8.3 format */
23 #define IS_END_OF_NAME(ch) (!(ch) || ((ch) == '/') || ((ch) == '\\'))
25 /* DOS device descriptor */
34 extern void FILE_SetDosError(void);
35 extern HFILE
FILE_DupUnixHandle( int fd
, DWORD access
);
36 extern BOOL
FILE_Stat( LPCSTR unixName
, BY_HANDLE_FILE_INFORMATION
*info
);
37 extern HFILE16
FILE_Dup2( HFILE16 hFile1
, HFILE16 hFile2
);
38 extern HFILE
FILE_CreateFile( LPCSTR filename
, DWORD access
, DWORD sharing
,
39 LPSECURITY_ATTRIBUTES sa
, DWORD creation
,
40 DWORD attributes
, HANDLE
template );
41 extern HFILE
FILE_CreateDevice( int client_id
, DWORD access
,
42 LPSECURITY_ATTRIBUTES sa
);
43 extern LPVOID
FILE_dommap( int unix_handle
, LPVOID start
,
44 DWORD size_high
, DWORD size_low
,
45 DWORD offset_high
, DWORD offset_low
,
46 int prot
, int flags
);
47 extern int FILE_munmap( LPVOID start
, DWORD size_high
, DWORD size_low
);
48 extern HFILE16
FILE_AllocDosHandle( HANDLE handle
);
49 extern BOOL
FILE_InitProcessDosHandles( void );
50 extern HANDLE
FILE_GetHandle( HFILE16 hfile
);
51 extern HFILE16
_lcreat16_uniq( LPCSTR path
, INT attr
);
53 /* files/directory.c */
54 extern int DIR_Init(void);
55 extern UINT
DIR_GetWindowsUnixDir( LPSTR path
, UINT count
);
56 extern UINT
DIR_GetSystemUnixDir( LPSTR path
, UINT count
);
57 extern DWORD
DIR_SearchPath( LPCSTR path
, LPCSTR name
, LPCSTR ext
,
58 DOS_FULL_NAME
*full_name
, BOOL win32
);
61 extern void DOSFS_UnixTimeToFileTime( time_t unixtime
, LPFILETIME ft
,
63 extern time_t DOSFS_FileTimeToUnixTime( const FILETIME
*ft
, DWORD
*remainder
);
64 extern BOOL
DOSFS_ToDosFCBFormat( LPCSTR name
, LPSTR buffer
);
65 extern const DOS_DEVICE
*DOSFS_GetDevice( const char *name
);
66 extern const DOS_DEVICE
*DOSFS_GetDeviceByHandle( HFILE hFile
);
67 extern HFILE
DOSFS_OpenDevice( const char *name
, DWORD access
);
68 extern BOOL
DOSFS_FindUnixName( LPCSTR path
, LPCSTR name
, LPSTR long_buf
,
69 INT long_len
, LPSTR short_buf
,
71 extern BOOL
DOSFS_GetFullName( LPCSTR name
, BOOL check_last
,
72 DOS_FULL_NAME
*full
);
73 extern int DOSFS_FindNext( const char *path
, const char *short_mask
,
74 const char *long_mask
, int drive
, BYTE attr
,
75 int skip
, WIN32_FIND_DATAA
*entry
);
77 #endif /* __WINE_FILE_H */