Share via


IAclFileAttributeView 인터페이스

정의

파일의 ACL(Access Control Lists) 또는 파일 소유자 특성을 읽거나 업데이트할 수 있도록 지원하는 파일 특성 보기입니다.

[Android.Runtime.Register("java/nio/file/attribute/AclFileAttributeView", "", "Java.Nio.FileNio.Attributes.IAclFileAttributeViewInvoker", ApiSince=26)]
public interface IAclFileAttributeView : IDisposable, Java.Interop.IJavaPeerable, Java.Nio.FileNio.Attributes.IFileOwnerAttributeView
[<Android.Runtime.Register("java/nio/file/attribute/AclFileAttributeView", "", "Java.Nio.FileNio.Attributes.IAclFileAttributeViewInvoker", ApiSince=26)>]
type IAclFileAttributeView = interface
    interface IFileOwnerAttributeView
    interface IFileAttributeView
    interface IAttributeView
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
특성
구현

설명

파일의 ACL(Access Control Lists) 또는 파일 소유자 특성을 읽거나 업데이트할 수 있도록 지원하는 파일 특성 보기입니다.

ACL은 파일 시스템 개체에 대한 액세스 권한을 지정하는 데 사용됩니다. ACL은 순서가 지정된 목록으로 AclEntry access-control-entries, 각각 해당 사용자 보안 주체에 대한 및 액세스 수준을 지정합니다 UserPrincipal . 이 파일 특성 뷰는 #getAcl() getAclRFC 에 지정된 ACL 모델을 기반으로 ACL을 읽고 쓰는 및 #setAcl(List) setAcl 메서드를 정의합니다. 3530: NFS(네트워크 파일 시스템) 버전 4 프로토콜http://www.ietf.org/rfc/rfc3530.txt. 이 파일 특성 뷰는 NFSv4 ACL 모델을 지원하거나 <>NFSv4 ACL 모델과 파일 시스템에서 사용하는 ACL 모델 간에 잘 정의된</em> 매핑이 있는 파일 시스템 구현을 위한 것입니다. 이러한 매핑의 세부 정보는 구현에 따라 달라지므로 지정되지 않습니다.

또한 이 클래스는 FileOwnerAttributeView 파일 소유자를 가져와서 설정하는 메서드를 정의할 수 있도록 확장됩니다.

파일 시스템에서 동종이 아닌 집합 FileStore file-systems 에 대한 액세스를 제공하는 경우 일부 파일 시스템만 ACL을 지원할 수 있습니다. 메서드를 FileStore#supportsFileAttributeView supportsFileAttributeView 사용하여 파일 시스템이 ACL을 지원하는지 테스트할 수 있습니다.

<h2>상호 운용성</h2>

RFC  3530을 사용하면 POSIX 정의 액세스 권한을 지원하는 플랫폼에서 특수 사용자 ID를 사용할 수 있습니다. 특수 사용자 ID는 "", "OWNER@GROUP@" 및 "EVERYONE@"입니다. 및 PosixFileAttributeViewAclFileAttributeView 모두 지원되는 경우 이러한 특수 사용자 ID는 읽거나 쓰는 ACL AclEntry entries 에 포함될 수 있습니다. 파일 시스템의 UserPrincipalLookupService 를 사용하여 메서드를 호출 UserPrincipalLookupService#lookupPrincipalByName lookupPrincipalByName 하여 이러한 특수 ID를 나타내는 를 가져올 UserPrincipal 수 있습니다.

<b>사용 예제:</b> 기존 ACL에 항목을 추가하여 "joe" 액세스 권한을 부여한다고 가정합니다.

// lookup "joe"
                UserPrincipal joe = file.getFileSystem().getUserPrincipalLookupService()
                    .lookupPrincipalByName("joe");

                // get view
                AclFileAttributeView view = Files.getFileAttributeView(file, AclFileAttributeView.class);

                // create ACE to give "joe" read access
                AclEntry entry = AclEntry.newBuilder()
                    .setType(AclEntryType.ALLOW)
                    .setPrincipal(joe)
                    .setPermissions(AclEntryPermission.READ_DATA, AclEntryPermission.READ_ATTRIBUTES)
                    .build();

                // read ACL, insert ACE, re-write ACL
                List&lt;AclEntry&gt; acl = view.getAcl();
                acl.add(0, entry);   // insert before any DENY entries
                view.setAcl(acl);

<h2> 동적 액세스 </h2>

파일 특성에 대한 동적 액세스가 필요한 경우 이 특성 뷰에서 지원하는 특성은 다음과 같습니다<. blockquote<>table class="스트라이프"><캡션 style="display:none">Supported attributes</캡션<>thead<>tr<>th scope="col"> Name </th th><scope="col"> Type </th></tr></thead><tbody><tr><th scope="row"> "acl" </th><td>List<AclEntry> </td></tr tr>><<th scope="row"> "owner" </th<>td>UserPrincipal</td<>/tr<>/tbody<>/table></blockquote>

메서드는 Files#getAttribute getAttribute 또는 #getOwner getOwner 메서드를 호출하는 것처럼 ACL 또는 소유자 특성을 읽는 #getAcl getAcl 데 사용할 수 있습니다.

메서드를 Files#setAttribute setAttribute 사용하여 또는 #setOwner setOwner 메서드를 호출하는 것처럼 ACL 또는 소유자 특성을 업데이트할 #setAcl setAcl 수 있습니다.

<h2> 파일을 <만들 때 ACL 설정 /h2>

이 특성 보기를 지원하는 구현은 파일 또는 디렉터리를 만들 때 초기 ACL 설정을 지원할 수도 있습니다. 초기 ACL은 또는 Files#createDirectory createDirectoryFileAttribute 와 같은 Files#createFile createFile 메서드와 개체 목록 AclEntry 인 및 FileAttribute#value valueFileAttribute#name name"acl:acl" 에 제공될 수 있습니다.

구현이 NFSv4 정의된 ACL 모델과 다른 ACL 모델을 지원하는 경우 파일을 만들 때 초기 ACL을 설정하려면 ACL을 파일 시스템에서 지원하는 모델로 변환해야 합니다. 파일을 만드는 메서드는 변환의 결과로 안전하지 않은 파일을 만들려는 시도를 거부해야 합니다(throw IOException IOException).

1.7에 추가되었습니다.

에 대한 Java 설명서입니다 java.nio.file.attribute.AclFileAttributeView.

이 페이지의 일부는 만들고 공유하며 에 설명된 용어에 따라 사용되는 작업을 기반으로 수정됩니다.

속성

Acl

파일의 ACL(Access Control Lists) 또는 파일 소유자 특성을 읽거나 업데이트할 수 있도록 지원하는 파일 특성 보기입니다.

Handle

기본 Android 개체의 JNI 값을 가져옵니다.

(다음에서 상속됨 IJavaObject)
JniIdentityHashCode

java.lang.System.identityHashCode() 래핑된 instance 값을 반환합니다.

(다음에서 상속됨 IJavaPeerable)
JniManagedPeerState

관리되는 피어의 상태입니다.

(다음에서 상속됨 IJavaPeerable)
JniPeerMembers

멤버 액세스 및 호출 지원.

(다음에서 상속됨 IJavaPeerable)
Owner

파일의 ACL(Access Control Lists) 또는 파일 소유자 특성을 읽거나 업데이트할 수 있도록 지원하는 파일 특성 보기입니다.

(다음에서 상속됨 IFileOwnerAttributeView)
PeerReference

JniObjectReference 래핑된 Java 개체 instance 의 를 반환합니다.

(다음에서 상속됨 IJavaPeerable)

메서드

Disposed()

instance 삭제되었을 때 호출됩니다.

(다음에서 상속됨 IJavaPeerable)
DisposeUnlessReferenced()

이 instance 대한 미해결 참조가 없으면 를 호출Dispose()합니다. 그렇지 않으면 아무 것도 수행하지 않습니다.

(다음에서 상속됨 IJavaPeerable)
Finalized()

instance 완료되면 호출됩니다.

(다음에서 상속됨 IJavaPeerable)
Name()

특성 뷰의 이름을 반환합니다.

SetJniIdentityHashCode(Int32)

에서 반환 JniIdentityHashCode된 값을 설정합니다.

(다음에서 상속됨 IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates)

파일의 ACL(Access Control Lists) 또는 파일 소유자 특성을 읽거나 업데이트할 수 있도록 지원하는 파일 특성 보기입니다.

(다음에서 상속됨 IJavaPeerable)
SetPeerReference(JniObjectReference)

에서 반환 PeerReference된 값을 설정합니다.

(다음에서 상속됨 IJavaPeerable)
UnregisterFromRuntime()

런타임이 이후 Java.Interop.JniRuntime+JniValueManager.PeekValue 호출에서 반환되지 않도록 이 instance 등록을 취소합니다.

(다음에서 상속됨 IJavaPeerable)

확장 메서드

JavaCast<TResult>(IJavaObject)

Android 런타임 확인 형식 변환을 수행합니다.

JavaCast<TResult>(IJavaObject)

파일의 ACL(Access Control Lists) 또는 파일 소유자 특성을 읽거나 업데이트할 수 있도록 지원하는 파일 특성 보기입니다.

GetJniTypeName(IJavaPeerable)

파일의 ACL(Access Control Lists) 또는 파일 소유자 특성을 읽거나 업데이트할 수 있도록 지원하는 파일 특성 보기입니다.

적용 대상