ReactOS 0.4.16-dev-1063-gd722e70
direct.h
Go to the documentation of this file.
1//
2// direct.h
3//
4// Copyright (c) Microsoft Corporation. All rights reserved.
5//
6// Functions for directory handling and creation.
7//
8#pragma once
9#ifndef _INC_DIRECT // include guard for 3rd party interop
10#define _INC_DIRECT
11
12#include <corecrt.h>
13#include <corecrt_wdirect.h>
14
15#pragma warning(push)
16#pragma warning(disable: _UCRT_DISABLED_WARNINGS)
18
20
21
22
23#ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
24
25 #ifndef _DISKFREE_T_DEFINED
26 #define _DISKFREE_T_DEFINED
27 struct _diskfree_t
28 {
29 unsigned total_clusters;
30 unsigned avail_clusters;
31 unsigned sectors_per_cluster;
32 unsigned bytes_per_sector;
33 };
34 #endif
35
36 #if _CRT_FUNCTIONS_REQUIRED
37
38 _Success_(return == 0)
41 _In_ unsigned _Drive,
42 _Out_ struct _diskfree_t* _DiskFree
43 );
44
46
48
49 _Check_return_ _DCRTIMP unsigned long __cdecl _getdrives(void);
50
51 #endif // _CRT_FUNCTIONS_REQUIRED
52#endif // _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
53
54
55
56#pragma push_macro("_getcwd")
57#pragma push_macro("_getdcwd")
58#undef _getcwd
59#undef _getdcwd
60
61_Success_(return != 0)
64 _Out_writes_opt_z_(_SizeInBytes) char* _DstBuf,
66 );
67
68_Success_(return != 0)
71 _In_ int _Drive,
74 );
75
76#define _getdcwd_nolock _getdcwd
77
78#pragma pop_macro("_getcwd")
79#pragma pop_macro("_getdcwd")
80
82
84
86
87
88
89#if defined(_CRT_INTERNAL_NONSTDC_NAMES) && _CRT_INTERNAL_NONSTDC_NAMES
90
91 #ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
92
93 #pragma push_macro("getcwd")
94 #undef getcwd
95
96 _Success_(return != 0)
99 _Out_writes_opt_z_(_SizeInBytes) char* _DstBuf,
101 );
102
103 #pragma pop_macro("getcwd")
104
107 _In_z_ char const* _Path
108 );
109
110 #define diskfree_t _diskfree_t
111
112 #endif // _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
113
116 _In_z_ char const* _Path
117 );
118
121 _In_z_ char const* _Path
122 );
123
124#endif // _CRT_INTERNAL_NONSTDC_NAMES
125
126
127
130#pragma warning(pop) // _UCRT_DISABLED_WARNINGS
131#endif // _INC_DIRECT
#define __cdecl
Definition: accygwin.h:79
#define mkdir
Definition: acwin.h:101
return
Definition: dirsup.c:529
_Check_return_ _CRTIMP int __cdecl _chdrive(_In_ int _Drive)
_Check_return_ _CRTIMP int __cdecl _getdrive(void)
Definition: getdrive.c:20
_Check_return_ _Ret_opt_z_ _CRTIMP char *__cdecl _getcwd(_Out_writes_opt_(_SizeInBytes) char *_DstBuf, _In_ int _SizeInBytes)
_Check_return_ _Ret_opt_z_ _CRTIMP char *__cdecl _getdcwd(_In_ int _Drive, _Out_writes_opt_(_SizeInBytes) char *_DstBuf, _In_ int _SizeInBytes)
_Check_return_ _CRTIMP int __cdecl _rmdir(_In_z_ const char *_Path)
_Check_return_ _CRTIMP int __cdecl _chdir(_In_z_ const char *_Path)
_Check_return_ _CRTIMP int __cdecl _mkdir(_In_z_ const char *_Path)
_Check_return_ _Ret_opt_z_ _CRTIMP char *__cdecl getcwd(_Out_writes_opt_(_SizeInBytes) char *_DstBuf, _In_ int _SizeInBytes)
_Check_return_ _CRTIMP unsigned __cdecl _getdiskfree(_In_ unsigned _Drive, _Out_ struct _diskfree_t *_DiskFree)
_Check_return_ _CRTIMP unsigned long __cdecl _getdrives(void)
Definition: getdrive.c:35
_Pre_notnull_ _In_opt_z_ char const _Drive
Definition: stdlib.h:1098
_In_z_ char const * _Path
Definition: stdlib.h:1070
#define rmdir
Definition: syshdrs.h:70
#define chdir
Definition: syshdrs.h:69
#define _Success_(c)
Definition: no_sal2.h:84
#define _In_z_
Definition: no_sal2.h:164
#define _Check_return_
Definition: no_sal2.h:60
#define _Out_writes_opt_z_(s)
Definition: no_sal2.h:230
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define _Ret_maybenull_z_
Definition: no_sal2.h:330
_In_ size_t _SizeInBytes
Definition: time.h:146
unsigned bytes_per_sector
Definition: direct.h:24
unsigned sectors_per_cluster
Definition: direct.h:23
unsigned total_clusters
Definition: direct.h:21
unsigned avail_clusters
Definition: direct.h:22
#define _DCRTIMP
Definition: corecrt.h:154
#define _CRT_NONSTDC_DEPRECATE(_NewName)
Definition: corecrt.h:439
#define _ACRTIMP
Definition: corecrt.h:138
#define _CRTALLOCATOR
Definition: corecrt.h:167
#define _UCRT_DISABLE_CLANG_WARNINGS
Definition: corecrt.h:109
#define _UCRT_RESTORE_CLANG_WARNINGS
Definition: corecrt.h:117
#define _CRT_END_C_HEADER
Definition: vcruntime.h:42
#define _CRT_BEGIN_C_HEADER
Definition: vcruntime.h:40