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 */
33 /* locale-independent case conversion */
34 inline static char FILE_tolower( char c
)
36 if (c
>= 'A' && c
<= 'Z') c
+= 32;
39 inline static char FILE_toupper( char c
)
41 if (c
>= 'a' && c
<= 'z') c
-= 32;
46 extern int FILE_strcasecmp( const char *str1
, const char *str2
);
47 extern int FILE_strncasecmp( const char *str1
, const char *str2
, int len
);
48 extern void FILE_SetDosError(void);
49 extern HFILE
FILE_DupUnixHandle( int fd
, DWORD access
);
50 extern int FILE_GetUnixHandle( HANDLE handle
, DWORD access
);
51 extern BOOL
FILE_Stat( LPCSTR unixName
, BY_HANDLE_FILE_INFORMATION
*info
);
52 extern HFILE16
FILE_Dup2( HFILE16 hFile1
, HFILE16 hFile2
);
53 extern HANDLE
FILE_CreateFile( LPCSTR filename
, DWORD access
, DWORD sharing
,
54 LPSECURITY_ATTRIBUTES sa
, DWORD creation
,
55 DWORD attributes
, HANDLE
template, BOOL fail_read_only
);
56 extern HFILE
FILE_CreateDevice( int client_id
, DWORD access
,
57 LPSECURITY_ATTRIBUTES sa
);
59 /* files/directory.c */
60 extern int DIR_Init(void);
61 extern UINT
DIR_GetWindowsUnixDir( LPSTR path
, UINT count
);
62 extern UINT
DIR_GetSystemUnixDir( LPSTR path
, UINT count
);
63 extern DWORD
DIR_SearchPath( LPCSTR path
, LPCSTR name
, LPCSTR ext
,
64 DOS_FULL_NAME
*full_name
, BOOL win32
);
67 extern void DOSFS_UnixTimeToFileTime( time_t unixtime
, LPFILETIME ft
,
69 extern time_t DOSFS_FileTimeToUnixTime( const FILETIME
*ft
, DWORD
*remainder
);
70 extern BOOL
DOSFS_ToDosFCBFormat( LPCSTR name
, LPSTR buffer
);
71 extern const DOS_DEVICE
*DOSFS_GetDevice( const char *name
);
72 extern const DOS_DEVICE
*DOSFS_GetDeviceByHandle( HFILE hFile
);
73 extern HFILE
DOSFS_OpenDevice( const char *name
, DWORD access
);
74 extern BOOL
DOSFS_FindUnixName( LPCSTR path
, LPCSTR name
, LPSTR long_buf
,
75 INT long_len
, LPSTR short_buf
,
77 extern BOOL
DOSFS_GetFullName( LPCSTR name
, BOOL check_last
,
78 DOS_FULL_NAME
*full
);
79 extern int DOSFS_FindNext( const char *path
, const char *short_mask
,
80 const char *long_mask
, int drive
, BYTE attr
,
81 int skip
, WIN32_FIND_DATAA
*entry
);
84 extern HANDLE
DEVICE_Open( LPCSTR filename
, DWORD access
, LPSECURITY_ATTRIBUTES sa
);
86 #endif /* __WINE_FILE_H */