Make the standard create_file request handle serial ports too, and
[wine.git] / include / file.h
blob32166b78f02cef03b9da9c70c92c854558e68f86
1 /*
2 * File handling declarations
4 * Copyright 1996 Alexandre Julliard
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.
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.
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
21 #ifndef __WINE_FILE_H
22 #define __WINE_FILE_H
24 #include <stdarg.h>
25 #include <windef.h>
26 #include <winbase.h>
28 #define MAX_PATHNAME_LEN 1024
30 /* Definition of a full DOS file name */
31 typedef struct
33 char long_name[MAX_PATHNAME_LEN]; /* Long pathname in Unix format */
34 WCHAR short_name[MAX_PATHNAME_LEN]; /* Short pathname in DOS 8.3 format */
35 int drive;
36 } DOS_FULL_NAME;
38 /* files/file.c */
39 extern mode_t FILE_umask;
40 extern void FILE_SetDosError(void);
41 extern BOOL FILE_Stat( LPCSTR unixName, BY_HANDLE_FILE_INFORMATION *info, BOOL *is_symlink );
42 extern HANDLE FILE_CreateFile( LPCSTR filename, DWORD access, DWORD sharing,
43 LPSECURITY_ATTRIBUTES sa, DWORD creation,
44 DWORD attributes, HANDLE template, BOOL fail_read_only,
45 UINT drive_type );
47 /* files/directory.c */
48 extern int DIR_Init(void);
49 extern DWORD DIR_SearchPath( LPCWSTR path, LPCWSTR name, LPCWSTR ext,
50 DOS_FULL_NAME *full_name, BOOL win32 );
52 /* files/dos_fs.c */
53 extern HANDLE DOSFS_OpenDevice( LPCWSTR name, DWORD access, DWORD attributes, LPSECURITY_ATTRIBUTES sa);
54 extern BOOL DOSFS_FindUnixName( const DOS_FULL_NAME *path, LPCWSTR name, char *long_buf,
55 INT long_len, LPWSTR short_buf );
56 extern BOOL DOSFS_GetFullName( LPCWSTR name, BOOL check_last,
57 DOS_FULL_NAME *full );
59 /* drive.c */
61 #define DRIVE_FAIL_READ_ONLY 0x0001 /* Fail opening read-only files for writing */
63 extern int DRIVE_Init(void);
64 extern int DRIVE_IsValid( int drive );
65 extern int DRIVE_GetCurrentDrive(void);
66 extern int DRIVE_SetCurrentDrive( int drive );
67 extern int DRIVE_FindDriveRoot( const char **path );
68 extern int DRIVE_FindDriveRootW( LPCWSTR *path );
69 extern const char * DRIVE_GetRoot( int drive );
70 extern LPCWSTR DRIVE_GetDosCwd( int drive );
71 extern const char * DRIVE_GetUnixCwd( int drive );
72 extern const char * DRIVE_GetDevice( int drive );
73 extern UINT DRIVE_GetFlags( int drive );
74 extern int DRIVE_Chdir( int drive, LPCWSTR path );
75 extern WCHAR *DRIVE_BuildEnv(void);
77 /* vxd.c */
78 extern HANDLE VXD_Open( LPCWSTR filename, DWORD access, LPSECURITY_ATTRIBUTES sa );
80 #endif /* __WINE_FILE_H */