Get rid of the Filesystem option in the drive config, this was more
[wine] / include / file.h
1 /*
2  * File handling declarations
3  *
4  * Copyright 1996 Alexandre Julliard
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #ifndef __WINE_FILE_H
22 #define __WINE_FILE_H
23
24 #include <stdarg.h>
25 #include <time.h> /* time_t */
26 #ifdef HAVE_SYS_TIME_H
27 # include <sys/time.h>
28 #endif
29 #include <sys/types.h>
30 #include <windef.h>
31 #include <winbase.h>
32 #include <wine/windef16.h>  /* HFILE16 */
33 #include <winreg.h>
34 #include <winternl.h>
35
36 #define MAX_PATHNAME_LEN   1024
37
38 /* Definition of a full DOS file name */
39 typedef struct
40 {
41     char  long_name[MAX_PATHNAME_LEN];  /* Long pathname in Unix format */
42     WCHAR short_name[MAX_PATHNAME_LEN]; /* Short pathname in DOS 8.3 format */
43     int   drive;
44 } DOS_FULL_NAME;
45
46 #define IS_END_OF_NAME(ch)  (!(ch) || ((ch) == '/') || ((ch) == '\\'))
47
48 /* locale-independent case conversion */
49 inline static char FILE_tolower( char c )
50 {
51     if (c >= 'A' && c <= 'Z') c += 32;
52     return c;
53 }
54 inline static char FILE_toupper( char c )
55 {
56     if (c >= 'a' && c <= 'z') c -= 32;
57     return c;
58 }
59
60 /* files/file.c */
61 extern mode_t FILE_umask;
62 extern int FILE_strcasecmp( const char *str1, const char *str2 );
63 extern int FILE_strncasecmp( const char *str1, const char *str2, int len );
64 extern void FILE_SetDosError(void);
65 extern BOOL FILE_Stat( LPCSTR unixName, BY_HANDLE_FILE_INFORMATION *info, BOOL *is_symlink );
66 extern HANDLE FILE_CreateFile( LPCSTR filename, DWORD access, DWORD sharing,
67                                LPSECURITY_ATTRIBUTES sa, DWORD creation,
68                                DWORD attributes, HANDLE template, BOOL fail_read_only,
69                                UINT drive_type );
70
71 extern LONG WINAPI WIN16_hread(HFILE16,SEGPTR,LONG);
72
73 /* files/directory.c */
74 extern int DIR_Init(void);
75 extern UINT DIR_GetWindowsUnixDir( LPSTR path, UINT count );
76 extern UINT DIR_GetSystemUnixDir( LPSTR path, UINT count );
77 extern DWORD DIR_SearchPath( LPCWSTR path, LPCWSTR name, LPCWSTR ext,
78                              DOS_FULL_NAME *full_name, BOOL win32 );
79
80 /* files/dos_fs.c */
81 extern BOOL DOSFS_ToDosFCBFormat( LPCWSTR name, LPWSTR buffer );
82 extern HANDLE DOSFS_OpenDevice( LPCWSTR name, DWORD access, DWORD attributes, LPSECURITY_ATTRIBUTES sa);
83 extern BOOL DOSFS_FindUnixName( const DOS_FULL_NAME *path, LPCWSTR name, char *long_buf,
84                                 INT long_len, LPWSTR short_buf );
85 extern BOOL DOSFS_GetFullName( LPCWSTR name, BOOL check_last,
86                                  DOS_FULL_NAME *full );
87
88 /* vxd.c */
89 extern HANDLE VXD_Open( LPCWSTR filename, DWORD access, LPSECURITY_ATTRIBUTES sa );
90
91 #endif  /* __WINE_FILE_H */