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