STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
utime.h
Go to the documentation of this file.
1 //
2 // sys/utime.h
3 //
4 // Copyright (c) Microsoft Corporation. All rights reserved.
5 //
6 // The _utime() family of functions.
7 //
8 #pragma once
9 
10 #include <corecrt.h>
11 
13 
14 
15 
16 //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
17 //
18 // Types
19 //
20 //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
21 #ifndef _CRT_NO_TIME_T
22  struct _utimbuf
23  {
24  time_t actime; // access time
25  time_t modtime; // modification time
26  };
27 #endif
28 
30 {
31  __time32_t actime; // access time
32  __time32_t modtime; // modification time
33 };
34 
36 {
37  __time64_t actime; // access time
38  __time64_t modtime; // modification time
39 };
40 
41 #if _CRT_INTERNAL_NONSTDC_NAMES && !defined _CRT_NO_TIME_T
42 
43  struct utimbuf
44  {
45  time_t actime; // access time
46  time_t modtime; // modification time
47  };
48 
49  struct utimbuf32
50  {
51  __time32_t actime; // access time
52  __time32_t modtime; // modification time
53  };
54 
55 #endif
56 
57 
58 
59 //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
60 //
61 // Functions
62 //
63 //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
64 _ACRTIMP int __cdecl _utime32(
65  _In_z_ char const* _FileName,
66  _In_opt_ struct __utimbuf32* _Time
67  );
68 
69 _ACRTIMP int __cdecl _futime32(
70  _In_ int _FileHandle,
71  _In_opt_ struct __utimbuf32* _Time
72  );
73 
74 _ACRTIMP int __cdecl _wutime32(
75  _In_z_ wchar_t const* _FileName,
76  _In_opt_ struct __utimbuf32* _Time
77  );
78 
79 _ACRTIMP int __cdecl _utime64(
80  _In_z_ char const* _FileName,
81  _In_opt_ struct __utimbuf64* _Time
82  );
83 
84 _ACRTIMP int __cdecl _futime64(
85  _In_ int _FileHandle,
86  _In_opt_ struct __utimbuf64* _Time
87  );
88 
89 _ACRTIMP int __cdecl _wutime64(
90  _In_z_ wchar_t const* _FileName,
91  _In_opt_ struct __utimbuf64* _Time
92  );
93 
94 
95 
96 #if !defined RC_INVOKED && !defined __midl && !defined _CRT_NO_TIME_T
97  #ifdef _USE_32BIT_TIME_T
98 
99  static __inline int __CRTDECL _utime(char const* const _FileName, struct _utimbuf* const _Time)
100  {
101  _STATIC_ASSERT(sizeof(struct _utimbuf) == sizeof(struct __utimbuf32));
102  return _utime32(_FileName, (struct __utimbuf32*)_Time);
103  }
104 
105  static __inline int __CRTDECL _futime(int const _FileHandle, struct _utimbuf* const _Time)
106  {
107  _STATIC_ASSERT(sizeof(struct _utimbuf) == sizeof(struct __utimbuf32));
108  return _futime32(_FileHandle, (struct __utimbuf32*)_Time);
109  }
110 
111  static __inline int __CRTDECL _wutime(wchar_t const* const _FileName, struct _utimbuf* const _Time)
112  {
113  _STATIC_ASSERT(sizeof(struct _utimbuf) == sizeof(struct __utimbuf32));
114  return _wutime32(_FileName, (struct __utimbuf32*)_Time);
115  }
116 
117  #else
118  static __inline int __CRTDECL _utime(char const* const _FileName, struct _utimbuf* const _Time)
119  {
120  _STATIC_ASSERT(sizeof(struct _utimbuf) == sizeof(struct __utimbuf64));
121  return _utime64(_FileName, (struct __utimbuf64*)_Time);
122  }
123 
124  static __inline int __CRTDECL _futime(int const _FileHandle, struct _utimbuf* const _Time)
125  {
126  _STATIC_ASSERT(sizeof(struct _utimbuf) == sizeof(struct __utimbuf64));
127  return _futime64(_FileHandle, (struct __utimbuf64*)_Time);
128  }
129 
130  static __inline int __CRTDECL _wutime(wchar_t const* const _FileName, struct _utimbuf* const _Time)
131  {
132  _STATIC_ASSERT(sizeof(struct _utimbuf) == sizeof(struct __utimbuf64));
133  return _wutime64(_FileName, (struct __utimbuf64*)_Time);
134  }
135 
136  #endif
137 
138  #if _CRT_INTERNAL_NONSTDC_NAMES
139  #ifdef _USE_32BIT_TIME_T
140 
141  static __inline int __CRTDECL utime(char const* const _FileName, struct utimbuf* const _Time)
142  {
143  _STATIC_ASSERT(sizeof(struct utimbuf) == sizeof(struct __utimbuf32));
144  return _utime32(_FileName, (struct __utimbuf32*)_Time);
145  }
146 
147  #else
148 
149  static __inline int __CRTDECL utime(char const* const _FileName, struct utimbuf* const _Time)
150  {
151  _STATIC_ASSERT(sizeof(struct utimbuf) == sizeof(struct __utimbuf64));
152  return _utime64(_FileName, (struct __utimbuf64*)_Time);
153  }
154 
155  #endif
156  #endif
157 #endif
158 
159 
160 
#define _ACRTIMP
Definition: corecrt.h:27
Definition: utime.h:22
_ACRTIMP int __cdecl _utime32(_In_z_ char const *_FileName, _In_opt_ struct __utimbuf32 *_Time)
#define _CRT_BEGIN_C_HEADER
Definition: vcruntime.h:73
static __inline int __CRTDECL _futime(int const _FileHandle, struct _utimbuf *const _Time)
Definition: utime.h:124
Definition: utime.h:29
__time64_t actime
Definition: utime.h:37
__time32_t modtime
Definition: utime.h:32
#define __CRTDECL
Definition: vcruntime.h:156
__time64_t time_t
Definition: corecrt.h:517
#define _In_z_
Definition: sal.h:310
time_t actime
Definition: utime.h:24
#define _In_
Definition: sal.h:305
#define _In_opt_
Definition: sal.h:306
__time64_t modtime
Definition: utime.h:38
long __time32_t
Definition: corecrt.h:479
_ACRTIMP int __cdecl _futime32(_In_ int _FileHandle, _In_opt_ struct __utimbuf32 *_Time)
__time32_t actime
Definition: utime.h:31
time_t modtime
Definition: utime.h:25
_In_opt_z_ wchar_t const _In_opt_z_ wchar_t const * _FileName
Definition: corecrt.h:253
#define _CRT_END_C_HEADER
Definition: vcruntime.h:76
_ACRTIMP int __cdecl _utime64(_In_z_ char const *_FileName, _In_opt_ struct __utimbuf64 *_Time)
static __inline int __CRTDECL _wutime(wchar_t const *const _FileName, struct _utimbuf *const _Time)
Definition: utime.h:130
__int64 __time64_t
Definition: corecrt.h:480
_STATIC_ASSERT(sizeof(unsigned int)<=_ALLOCA_S_MARKER_SIZE)
_ACRTIMP int __cdecl _wutime64(_In_z_ wchar_t const *_FileName, _In_opt_ struct __utimbuf64 *_Time)
Definition: utime.h:35
static __inline int __CRTDECL _utime(char const *const _FileName, struct _utimbuf *const _Time)
Definition: utime.h:118
_ACRTIMP int __cdecl _wutime32(_In_z_ wchar_t const *_FileName, _In_opt_ struct __utimbuf32 *_Time)
_ACRTIMP int __cdecl _futime64(_In_ int _FileHandle, _In_opt_ struct __utimbuf64 *_Time)