STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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 #define _INC_DIRECT
10 
11 #include <corecrt.h>
12 #include <corecrt_wdirect.h>
13 
15 
16 
17 
18 #ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
19 
20  #ifndef _DISKFREE_T_DEFINED
21  #define _DISKFREE_T_DEFINED
22  struct _diskfree_t
23  {
24  unsigned total_clusters;
25  unsigned avail_clusters;
27  unsigned bytes_per_sector;
28  };
29  #endif
30 
31  #if _CRT_FUNCTIONS_REQUIRED
32 
33  _Success_(return == 0)
35  _DCRTIMP unsigned __cdecl _getdiskfree(
36  _In_ unsigned _Drive,
38  );
39 
40  _Check_return_ _DCRTIMP int __cdecl _chdrive(_In_ int _Drive);
41 
42  _Check_return_ _DCRTIMP int __cdecl _getdrive(void);
43 
44  _Check_return_ _DCRTIMP unsigned long __cdecl _getdrives(void);
45 
46  #endif // _CRT_FUNCTIONS_REQUIRED
47 #endif // _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
48 
49 
50 
51 #pragma push_macro("_getcwd")
52 #pragma push_macro("_getdcwd")
53 #undef _getcwd
54 #undef _getdcwd
55 
56 _Success_(return != 0)
58 _ACRTIMP _CRTALLOCATOR char* __cdecl _getcwd(
60  _In_ int _SizeInBytes
61  );
62 
63 _Success_(return != 0)
65 _ACRTIMP _CRTALLOCATOR char* __cdecl _getdcwd(
66  _In_ int _Drive,
67  _Out_writes_opt_z_(_SizeInBytes) char* _DstBuf,
68  _In_ int _SizeInBytes
69  );
70 
71 #define _getdcwd_nolock _getdcwd
72 
73 #pragma pop_macro("_getcwd")
74 #pragma pop_macro("_getdcwd")
75 
76 _Check_return_ _ACRTIMP int __cdecl _chdir(_In_z_ char const* _Path);
77 
78 _Check_return_ _ACRTIMP int __cdecl _mkdir(_In_z_ char const* _Path);
79 
80 _Check_return_ _ACRTIMP int __cdecl _rmdir(_In_z_ char const* _Path);
81 
82 
83 
84 #if _CRT_INTERNAL_NONSTDC_NAMES
85 
86  #ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
87 
88  #pragma push_macro("getcwd")
89  #undef getcwd
90 
91  _Success_(return != 0)
93  _DCRTIMP char* __cdecl getcwd(
94  _Out_writes_opt_z_(_SizeInBytes) char* _DstBuf,
95  _In_ int _SizeInBytes
96  );
97 
98  #pragma pop_macro("getcwd")
99 
101  _DCRTIMP int __cdecl chdir(
102  _In_z_ char const* _Path
103  );
104 
105  #define diskfree_t _diskfree_t
106 
107  #endif // _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
108 
110  _ACRTIMP int __cdecl mkdir(
111  _In_z_ char const* _Path
112  );
113 
115  _ACRTIMP int __cdecl rmdir(
116  _In_z_ char const* _Path
117  );
118 
119 #endif // _CRT_INTERNAL_NONSTDC_NAMES
120 
121 
122 
#define _Out_
Definition: sal.h:342
return
Definition: corecrt_memcpy_s.h:60
_Out_writes_opt_z_(_SizeInBytes) char *_DstBuf
#define _ACRTIMP
Definition: corecrt.h:27
_Pre_notnull_ _In_opt_z_ wchar_t const _Drive
Definition: corecrt_wstdlib.h:366
_Check_return_ _ACRTIMP int __cdecl _mkdir(_In_z_ char const *_Path)
_In_z_ wchar_t const * _Path
Definition: corecrt_wstdlib.h:337
_Check_return_ _DCRTIMP unsigned long __cdecl _getdrives(void)
_In_ int _Pre_notnull_ _Post_z_ char * _DstBuf
Definition: stdlib.h:1329
_Check_return_ _ACRTIMP int __cdecl _chdir(_In_z_ char const *_Path)
#define _CRT_BEGIN_C_HEADER
Definition: vcruntime.h:73
_Check_return_ _DCRTIMP int __cdecl _chdrive(_In_ int _Drive)
#define _Check_return_
Definition: sal.h:554
#define _In_z_
Definition: sal.h:310
#define _In_
Definition: sal.h:305
_Check_return_ _CRT_NONSTDC_DEPRECATE(_chdir) _DCRTIMP int __cdecl chdir(_In_z_ char const *_Path)
#define _DCRTIMP
Definition: corecrt.h:43
_Out_ struct _diskfree_t * _DiskFree
Definition: direct.h:37
#define _CRTALLOCATOR
Definition: corecrt.h:56
#define _Ret_maybenull_z_
Definition: sal.h:522
_Check_return_ _DCRTIMP int __cdecl _getdrive(void)
unsigned bytes_per_sector
Definition: direct.h:27
Definition: direct.h:22
#define _CRT_END_C_HEADER
Definition: vcruntime.h:76
_Check_return_ _ACRTIMP int __cdecl _rmdir(_In_z_ char const *_Path)
unsigned avail_clusters
Definition: direct.h:25
unsigned total_clusters
Definition: direct.h:24
unsigned sectors_per_cluster
Definition: direct.h:26
_In_ int _SizeInBytes
Definition: direct.h:61
_Success_(return==0) _Check_return_ _DCRTIMP unsigned __cdecl _getdiskfree(_In_ unsigned _Drive