共用方式為


IDosFileAttributeView.SetReadOnly(Boolean) Method

Definition

Updates the value of the read-only attribute.

[Android.Runtime.Register("setReadOnly", "(Z)V", "GetSetReadOnly_ZHandler:Java.Nio.FileNio.Attributes.IDosFileAttributeViewInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public void SetReadOnly (bool value);
[<Android.Runtime.Register("setReadOnly", "(Z)V", "GetSetReadOnly_ZHandler:Java.Nio.FileNio.Attributes.IDosFileAttributeViewInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member SetReadOnly : bool -> unit

Parameters

value
Boolean

the new value of the attribute

Attributes

Remarks

Updates the value of the read-only attribute.

It is implementation specific if the attribute can be updated as an atomic operation with respect to other file system operations. An implementation may, for example, require to read the existing value of the DOS attribute in order to update this attribute.

Java documentation for java.nio.file.attribute.DosFileAttributeView.setReadOnly(boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to