2 * File handling declarations
4 * Copyright 1996 Alexandre Julliard
10 #include <time.h> /* time_t */
13 #include "wine/windef16.h" /* HFILE16 */
15 #define MAX_PATHNAME_LEN 1024
17 /* Definition of a full DOS file name */
20 char long_name
[MAX_PATHNAME_LEN
]; /* Long pathname in Unix format */
21 char short_name
[MAX_PATHNAME_LEN
]; /* Short pathname in DOS 8.3 format */
25 #define IS_END_OF_NAME(ch) (!(ch) || ((ch) == '/') || ((ch) == '\\'))
27 /* DOS device descriptor */
34 /* overlapped private structure */
36 typedef void (*async_handler
)(struct async_private
*ovp
, int revents
);
37 typedef struct async_private
39 LPOVERLAPPED lpOverlapped
;
46 struct async_private
*next
;
47 struct async_private
*prev
;
50 /* locale-independent case conversion */
51 inline static char FILE_tolower( char c
)
53 if (c
>= 'A' && c
<= 'Z') c
+= 32;
56 inline static char FILE_toupper( char c
)
58 if (c
>= 'a' && c
<= 'z') c
-= 32;
63 extern int FILE_strcasecmp( const char *str1
, const char *str2
);
64 extern int FILE_strncasecmp( const char *str1
, const char *str2
, int len
);
65 extern void FILE_SetDosError(void);
66 extern HANDLE
FILE_DupUnixHandle( int fd
, DWORD access
);
67 extern int FILE_GetUnixHandle( HANDLE handle
, DWORD access
);
68 extern BOOL
FILE_Stat( LPCSTR unixName
, BY_HANDLE_FILE_INFORMATION
*info
);
69 extern HFILE16
FILE_Dup2( HFILE16 hFile1
, HFILE16 hFile2
);
70 extern HANDLE
FILE_CreateFile( LPCSTR filename
, DWORD access
, DWORD sharing
,
71 LPSECURITY_ATTRIBUTES sa
, DWORD creation
,
72 DWORD attributes
, HANDLE
template, BOOL fail_read_only
);
73 extern HANDLE
FILE_CreateDevice( int client_id
, DWORD access
, LPSECURITY_ATTRIBUTES sa
);
75 extern LONG WINAPI
WIN16_hread(HFILE16
,SEGPTR
,LONG
);
77 /* files/directory.c */
78 extern int DIR_Init(void);
79 extern UINT
DIR_GetWindowsUnixDir( LPSTR path
, UINT count
);
80 extern UINT
DIR_GetSystemUnixDir( LPSTR path
, UINT count
);
81 extern DWORD
DIR_SearchPath( LPCSTR path
, LPCSTR name
, LPCSTR ext
,
82 DOS_FULL_NAME
*full_name
, BOOL win32
);
85 extern void DOSFS_UnixTimeToFileTime( time_t unixtime
, LPFILETIME ft
,
87 extern time_t DOSFS_FileTimeToUnixTime( const FILETIME
*ft
, DWORD
*remainder
);
88 extern BOOL
DOSFS_ToDosFCBFormat( LPCSTR name
, LPSTR buffer
);
89 extern const DOS_DEVICE
*DOSFS_GetDevice( const char *name
);
90 extern const DOS_DEVICE
*DOSFS_GetDeviceByHandle( HFILE hFile
);
91 extern HANDLE
DOSFS_OpenDevice( const char *name
, DWORD access
);
92 extern BOOL
DOSFS_FindUnixName( LPCSTR path
, LPCSTR name
, LPSTR long_buf
,
93 INT long_len
, LPSTR short_buf
,
95 extern BOOL
DOSFS_GetFullName( LPCSTR name
, BOOL check_last
,
96 DOS_FULL_NAME
*full
);
97 extern int DOSFS_FindNext( const char *path
, const char *short_mask
,
98 const char *long_mask
, int drive
, BYTE attr
,
99 int skip
, WIN32_FIND_DATAA
*entry
);
102 extern HANDLE
DEVICE_Open( LPCSTR filename
, DWORD access
, LPSECURITY_ATTRIBUTES sa
);
104 #endif /* __WINE_FILE_H */