-
Notifications
You must be signed in to change notification settings - Fork 0
/
IBasicFileAttributeView.xml
279 lines (279 loc) · 19 KB
/
IBasicFileAttributeView.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<Type Name="IBasicFileAttributeView" FullName="Java.Nio.FileNio.Attributes.IBasicFileAttributeView">
<TypeSignature Language="C#" Value="public interface IBasicFileAttributeView : IDisposable, Java.Interop.IJavaPeerable, Java.Nio.FileNio.Attributes.IFileAttributeView" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract beforefieldinit IBasicFileAttributeView implements class Android.Runtime.IJavaObject, class Java.Interop.IJavaPeerable, class Java.Nio.FileNio.Attributes.IAttributeView, class Java.Nio.FileNio.Attributes.IFileAttributeView, class System.IDisposable" />
<TypeSignature Language="DocId" Value="T:Java.Nio.FileNio.Attributes.IBasicFileAttributeView" />
<TypeSignature Language="F#" Value="type IBasicFileAttributeView = interface
 interface IFileAttributeView
 interface IAttributeView
 interface IJavaObject
 interface IDisposable
 interface IJavaPeerable" />
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Interfaces>
<Interface>
<InterfaceName>Android.Runtime.IJavaObject</InterfaceName>
</Interface>
<Interface>
<InterfaceName>Java.Interop.IJavaPeerable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>Java.Nio.FileNio.Attributes.IAttributeView</InterfaceName>
</Interface>
<Interface>
<InterfaceName>Java.Nio.FileNio.Attributes.IFileAttributeView</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("java/nio/file/attribute/BasicFileAttributeView", "", "Java.Nio.FileNio.Attributes.IBasicFileAttributeViewInvoker", ApiSince=26)]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("java/nio/file/attribute/BasicFileAttributeView", "", "Java.Nio.FileNio.Attributes.IBasicFileAttributeViewInvoker", ApiSince=26)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>A file attribute view that provides a view of a <em>basic set</em> of file
attributes common to many file systems.</summary>
<remarks>
<para>A file attribute view that provides a view of a <em>basic set</em> of file
attributes common to many file systems. The basic set of file attributes
consist of <em>mandatory</em> and <em>optional</em> file attributes as
defined by the <c>BasicFileAttributes</c> interface.</para>
<para>The file attributes are retrieved from the file system as a <em>bulk
operation</em> by invoking the <c>#readAttributes() readAttributes</c> method.
This class also defines the <c>#setTimes setTimes</c> method to update the
file's time attributes.</para>
<para>Where dynamic access to file attributes is required, the attributes
supported by this attribute view have the following names and types:
<blockquote>
<table class="striped">
<caption style="display:none">Supported attributes</caption>
<thead>
<tr>
<th scope="col"> Name </th>
<th scope="col"> Type </th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row"> "lastModifiedTime" </th>
<td> <c>FileTime</c></td>
</tr>
<tr>
<th scope="row"> "lastAccessTime" </th>
<td> <c>FileTime</c></td>
</tr>
<tr>
<th scope="row"> "creationTime" </th>
<td> <c>FileTime</c></td>
</tr>
<tr>
<th scope="row"> "size" </th>
<td> <c>Long</c></td>
</tr>
<tr>
<th scope="row"> "isRegularFile" </th>
<td> <c>Boolean</c></td>
</tr>
<tr>
<th scope="row"> "isDirectory" </th>
<td> <c>Boolean</c></td>
</tr>
<tr>
<th scope="row"> "isSymbolicLink" </th>
<td> <c>Boolean</c></td>
</tr>
<tr>
<th scope="row"> "isOther" </th>
<td> <c>Boolean</c></td>
</tr>
<tr>
<th scope="row"> "fileKey" </th>
<td> <c>Object</c></td>
</tr>
</tbody>
</table>
</blockquote></para>
<para>The <c>java.nio.file.Files#getAttribute getAttribute</c> method may be
used to read any of these attributes as if by invoking the <c>#readAttributes() readAttributes()</c> method.</para>
<para>The <c>java.nio.file.Files#setAttribute setAttribute</c> method may be
used to update the file's last modified time, last access time or create time
attributes as if by invoking the <c>#setTimes setTimes</c> method.</para>
<para>Added in 1.7.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/nio/file/attribute/BasicFileAttributeView" title="Reference documentation">Java documentation for <code>java.nio.file.attribute.BasicFileAttributeView</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
<Members>
<Member MemberName="Name">
<MemberSignature Language="C#" Value="public string? Name ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance string Name() cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Nio.FileNio.Attributes.IBasicFileAttributeView.Name" />
<MemberSignature Language="F#" Value="abstract member Name : unit -> string" Usage="iBasicFileAttributeView.Name " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Java.Nio.FileNio.Attributes.IAttributeView.Name</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("name", "()Ljava/lang/String;", "GetNameHandler:Java.Nio.FileNio.Attributes.IBasicFileAttributeViewInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("name", "()Ljava/lang/String;", "GetNameHandler:Java.Nio.FileNio.Attributes.IBasicFileAttributeViewInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Runtime.Versioning.SupportedOSPlatform("android26.0")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.Versioning.SupportedOSPlatform("android26.0")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns the name of the attribute view.</summary>
<returns>To be added.</returns>
<remarks>
<para>Returns the name of the attribute view. Attribute views of this type
have the name <c>"basic"</c>.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/nio/file/attribute/BasicFileAttributeView#name()" title="Reference documentation">Java documentation for <code>java.nio.file.attribute.BasicFileAttributeView.name()</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
</Member>
<Member MemberName="ReadAttributes">
<MemberSignature Language="C#" Value="public Java.Nio.FileNio.Attributes.IBasicFileAttributes? ReadAttributes ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Java.Nio.FileNio.Attributes.IBasicFileAttributes ReadAttributes() cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Nio.FileNio.Attributes.IBasicFileAttributeView.ReadAttributes" />
<MemberSignature Language="F#" Value="abstract member ReadAttributes : unit -> Java.Nio.FileNio.Attributes.IBasicFileAttributes" Usage="iBasicFileAttributeView.ReadAttributes " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("readAttributes", "()Ljava/nio/file/attribute/BasicFileAttributes;", "GetReadAttributesHandler:Java.Nio.FileNio.Attributes.IBasicFileAttributeViewInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("readAttributes", "()Ljava/nio/file/attribute/BasicFileAttributes;", "GetReadAttributesHandler:Java.Nio.FileNio.Attributes.IBasicFileAttributeViewInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Runtime.Versioning.SupportedOSPlatform("android26.0")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.Versioning.SupportedOSPlatform("android26.0")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Nio.FileNio.Attributes.IBasicFileAttributes</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Reads the basic file attributes as a bulk operation.</summary>
<returns>the file attributes</returns>
<remarks>
<para>Reads the basic file attributes as a bulk operation.</para>
<para>It is implementation specific if all file attributes are read as an
atomic operation with respect to other file system operations.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/nio/file/attribute/BasicFileAttributeView#readAttributes()" title="Reference documentation">Java documentation for <code>java.nio.file.attribute.BasicFileAttributeView.readAttributes()</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
</Member>
<Member MemberName="SetTimes">
<MemberSignature Language="C#" Value="public void SetTimes (Java.Nio.FileNio.Attributes.FileTime? lastModifiedTime, Java.Nio.FileNio.Attributes.FileTime? lastAccessTime, Java.Nio.FileNio.Attributes.FileTime? createTime);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void SetTimes(class Java.Nio.FileNio.Attributes.FileTime lastModifiedTime, class Java.Nio.FileNio.Attributes.FileTime lastAccessTime, class Java.Nio.FileNio.Attributes.FileTime createTime) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Nio.FileNio.Attributes.IBasicFileAttributeView.SetTimes(Java.Nio.FileNio.Attributes.FileTime,Java.Nio.FileNio.Attributes.FileTime,Java.Nio.FileNio.Attributes.FileTime)" />
<MemberSignature Language="F#" Value="abstract member SetTimes : Java.Nio.FileNio.Attributes.FileTime * Java.Nio.FileNio.Attributes.FileTime * Java.Nio.FileNio.Attributes.FileTime -> unit" Usage="iBasicFileAttributeView.SetTimes (lastModifiedTime, lastAccessTime, createTime)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("setTimes", "(Ljava/nio/file/attribute/FileTime;Ljava/nio/file/attribute/FileTime;Ljava/nio/file/attribute/FileTime;)V", "GetSetTimes_Ljava_nio_file_attribute_FileTime_Ljava_nio_file_attribute_FileTime_Ljava_nio_file_attribute_FileTime_Handler:Java.Nio.FileNio.Attributes.IBasicFileAttributeViewInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("setTimes", "(Ljava/nio/file/attribute/FileTime;Ljava/nio/file/attribute/FileTime;Ljava/nio/file/attribute/FileTime;)V", "GetSetTimes_Ljava_nio_file_attribute_FileTime_Ljava_nio_file_attribute_FileTime_Ljava_nio_file_attribute_FileTime_Handler:Java.Nio.FileNio.Attributes.IBasicFileAttributeViewInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Runtime.Versioning.SupportedOSPlatform("android26.0")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.Versioning.SupportedOSPlatform("android26.0")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="lastModifiedTime" Type="Java.Nio.FileNio.Attributes.FileTime" />
<Parameter Name="lastAccessTime" Type="Java.Nio.FileNio.Attributes.FileTime" />
<Parameter Name="createTime" Type="Java.Nio.FileNio.Attributes.FileTime" />
</Parameters>
<Docs>
<param name="lastModifiedTime">the new last modified time, or <c>null</c> to not change the
value</param>
<param name="lastAccessTime">the last access time, or <c>null</c> to not change the value</param>
<param name="createTime">the file's create time, or <c>null</c> to not change the value</param>
<summary>Updates any or all of the file's last modified time, last access time,
and create time attributes.</summary>
<remarks>
<para>Updates any or all of the file's last modified time, last access time,
and create time attributes.</para>
<para>This method updates the file's timestamp attributes. The values are
converted to the epoch and precision supported by the file system.
Converting from finer to coarser granularities result in precision loss.
The behavior of this method when attempting to set a timestamp that is
not supported or to a value that is outside the range supported by the
underlying file store is not defined. It may or not fail by throwing an
<c>IOException</c>.</para>
<para>If any of the <c>lastModifiedTime</c>, <c>lastAccessTime</c>,
or <c>createTime</c> parameters has the value <c>null</c> then the
corresponding timestamp is not changed. An implementation may require to
read the existing values of the file attributes when only some, but not
all, of the timestamp attributes are updated. Consequently, this method
may not be an atomic operation with respect to other file system
operations. Reading and re-writing existing values may also result in
precision loss. If all of the <c>lastModifiedTime</c>, <c>lastAccessTime</c> and <c>createTime</c> parameters are <c>null</c> then
this method has no effect.</para>
<para><b>Usage Example:</b>
Suppose we want to change a file's last access time.</para>
<code lang="text/java">Path path = ...
FileTime time = ...
Files.getFileAttributeView(path, BasicFileAttributeView.class).setTimes(null, time, null);
</code>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/nio/file/attribute/BasicFileAttributeView#setTimes(java.nio.file.attribute.FileTime,%20java.nio.file.attribute.FileTime,%20java.nio.file.attribute.FileTime)" title="Reference documentation">Java documentation for <code>java.nio.file.attribute.BasicFileAttributeView.setTimes(java.nio.file.attribute.FileTime, java.nio.file.attribute.FileTime, java.nio.file.attribute.FileTime)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
</Member>
</Members>
</Type>