2 * File handling declarations
4 * Copyright 1996 Alexandre Julliard
10 #include <time.h> /* time_t */
12 #include "wine/windef16.h" /* HFILE16 */
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 HFILE
FILE_DupUnixHandle( int fd
, DWORD access
);
37 extern int FILE_GetUnixHandle( HANDLE handle
, DWORD access
);
38 extern BOOL
FILE_Stat( LPCSTR unixName
, BY_HANDLE_FILE_INFORMATION
*info
);
39 extern HFILE16
FILE_Dup2( HFILE16 hFile1
, HFILE16 hFile2
);
40 extern HANDLE
FILE_CreateFile( LPCSTR filename
, DWORD access
, DWORD sharing
,
41 LPSECURITY_ATTRIBUTES sa
, DWORD creation
,
42 DWORD attributes
, HANDLE
template, BOOL fail_read_only
);
43 extern HFILE
FILE_CreateDevice( int client_id
, DWORD access
,
44 LPSECURITY_ATTRIBUTES sa
);
45 extern HFILE16
FILE_AllocDosHandle( HANDLE handle
);
46 extern HANDLE
FILE_GetHandle( HFILE16 hfile
);
48 /* files/directory.c */
49 extern int DIR_Init(void);
50 extern UINT
DIR_GetWindowsUnixDir( LPSTR path
, UINT count
);
51 extern UINT
DIR_GetSystemUnixDir( LPSTR path
, UINT count
);
52 extern DWORD
DIR_SearchPath( LPCSTR path
, LPCSTR name
, LPCSTR ext
,
53 DOS_FULL_NAME
*full_name
, BOOL win32
);
56 extern void DOSFS_UnixTimeToFileTime( time_t unixtime
, LPFILETIME ft
,
58 extern time_t DOSFS_FileTimeToUnixTime( const FILETIME
*ft
, DWORD
*remainder
);
59 extern BOOL
DOSFS_ToDosFCBFormat( LPCSTR name
, LPSTR buffer
);
60 extern const DOS_DEVICE
*DOSFS_GetDevice( const char *name
);
61 extern const DOS_DEVICE
*DOSFS_GetDeviceByHandle( HFILE hFile
);
62 extern HFILE
DOSFS_OpenDevice( const char *name
, DWORD access
);
63 extern BOOL
DOSFS_FindUnixName( LPCSTR path
, LPCSTR name
, LPSTR long_buf
,
64 INT long_len
, LPSTR short_buf
,
66 extern BOOL
DOSFS_GetFullName( LPCSTR name
, BOOL check_last
,
67 DOS_FULL_NAME
*full
);
68 extern int DOSFS_FindNext( const char *path
, const char *short_mask
,
69 const char *long_mask
, int drive
, BYTE attr
,
70 int skip
, WIN32_FIND_DATAA
*entry
);
73 extern HANDLE
DEVICE_Open( LPCSTR filename
, DWORD access
, LPSECURITY_ATTRIBUTES sa
);
75 #endif /* __WINE_FILE_H */