Condividi tramite


Files.SetPosixFilePermissions Method

Definition

Sets a file's POSIX permissions.

[Android.Runtime.Register("setPosixFilePermissions", "(Ljava/nio/file/Path;Ljava/util/Set;)Ljava/nio/file/Path;", "", ApiSince=26)]
public static Java.Nio.FileNio.IPath? SetPosixFilePermissions (Java.Nio.FileNio.IPath? path, System.Collections.Generic.ICollection<Java.Nio.FileNio.Attributes.PosixFilePermission>? perms);
[<Android.Runtime.Register("setPosixFilePermissions", "(Ljava/nio/file/Path;Ljava/util/Set;)Ljava/nio/file/Path;", "", ApiSince=26)>]
static member SetPosixFilePermissions : Java.Nio.FileNio.IPath * System.Collections.Generic.ICollection<Java.Nio.FileNio.Attributes.PosixFilePermission> -> Java.Nio.FileNio.IPath

Parameters

path
IPath

The path to the file

perms
ICollection<PosixFilePermission>

The new set of permissions

Returns

The path

Attributes

Remarks

Sets a file's POSIX permissions.

The path parameter is associated with a FileSystem that supports the PosixFileAttributeView. This attribute view provides access to file attributes commonly associated with files on file systems used by operating systems that implement the Portable Operating System Interface (POSIX) family of standards.

Java documentation for java.nio.file.Files.setPosixFilePermissions(java.nio.file.Path, java.util.Set<java.nio.file.attribute.PosixFilePermission>).

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