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