New examples/documentation for console configuration options.
[wine] / include / file.h
1 /*
2  * File handling declarations
3  *
4  * Copyright 1996 Alexandre Julliard
5  */
6
7 #ifndef __WINE_FILE_H
8 #define __WINE_FILE_H
9
10 #include <time.h>
11 #include "windows.h"
12 #include "k32obj.h"
13
14 #define MAX_PATHNAME_LEN   1024
15
16 /* Definition of a full DOS file name */
17 typedef struct
18 {
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 */
21     int   drive;
22 } DOS_FULL_NAME;
23
24 #define IS_END_OF_NAME(ch)  (!(ch) || ((ch) == '/') || ((ch) == '\\'))
25
26 /* DOS device descriptor */
27 typedef struct
28 {
29     char *name;
30     int flags;
31 } DOS_DEVICE;
32
33
34 /* files/file.c */
35 extern void FILE_SetDosError(void);
36 extern HFILE32 FILE_DupUnixHandle( int fd, DWORD access );
37 extern BOOL32 FILE_Stat( LPCSTR unixName, BY_HANDLE_FILE_INFORMATION *info );
38 extern HFILE16 FILE_Dup2( HFILE16 hFile1, HFILE16 hFile2 );
39 extern HFILE32 FILE_CreateFile( LPCSTR filename, DWORD access, DWORD sharing,
40                                 LPSECURITY_ATTRIBUTES sa, DWORD creation,
41                                 DWORD attributes, HANDLE32 template );
42 extern HFILE32 FILE_CreateDevice( int client_id, DWORD access,
43                                   LPSECURITY_ATTRIBUTES sa );
44 extern LPVOID FILE_dommap( int unix_handle, LPVOID start,
45                            DWORD size_high, DWORD size_low,
46                            DWORD offset_high, DWORD offset_low,
47                            int prot, int flags );
48 extern int FILE_munmap( LPVOID start, DWORD size_high, DWORD size_low );
49 extern HFILE16 FILE_AllocDosHandle( HANDLE32 handle );
50 extern BOOL32 FILE_InitProcessDosHandles( void );
51 extern HANDLE32 FILE_GetHandle32( HFILE16 hfile );
52 extern HFILE16 _lcreat16_uniq( LPCSTR path, INT32 attr );
53
54 /* files/directory.c */
55 extern int DIR_Init(void);
56 extern UINT32 DIR_GetWindowsUnixDir( LPSTR path, UINT32 count );
57 extern UINT32 DIR_GetSystemUnixDir( LPSTR path, UINT32 count );
58 extern DWORD DIR_SearchPath( LPCSTR path, LPCSTR name, LPCSTR ext,
59                              DOS_FULL_NAME *full_name, BOOL32 win32 );
60
61 /* files/dos_fs.c */
62 extern void DOSFS_UnixTimeToFileTime( time_t unixtime, LPFILETIME ft,
63                                       DWORD remainder );
64 extern time_t DOSFS_FileTimeToUnixTime( const FILETIME *ft, DWORD *remainder );
65 extern BOOL32 DOSFS_ToDosFCBFormat( LPCSTR name, LPSTR buffer );
66 extern const DOS_DEVICE *DOSFS_GetDevice( const char *name );
67 extern const DOS_DEVICE *DOSFS_GetDeviceByHandle( HFILE32 hFile );
68 extern HFILE32 DOSFS_OpenDevice( const char *name, DWORD access );
69 extern BOOL32 DOSFS_FindUnixName( LPCSTR path, LPCSTR name, LPSTR long_buf,
70                                   INT32 long_len, LPSTR short_buf,
71                                   BOOL32 ignore_case );
72 extern BOOL32 DOSFS_GetFullName( LPCSTR name, BOOL32 check_last,
73                                  DOS_FULL_NAME *full );
74 extern int DOSFS_FindNext( const char *path, const char *short_mask,
75                            const char *long_mask, int drive, BYTE attr,
76                            int skip, WIN32_FIND_DATA32A *entry );
77
78 #endif  /* __WINE_FILE_H */