IDosFileAttributeView 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
一個檔案屬性檢視,提供舊有「DOS」檔案屬性的視圖。
[Android.Runtime.Register("java/nio/file/attribute/DosFileAttributeView", "", "Java.Nio.FileNio.Attributes.IDosFileAttributeViewInvoker", ApiSince=26)]
public interface IDosFileAttributeView : IDisposable, Java.Interop.IJavaPeerable, Java.Nio.FileNio.Attributes.IBasicFileAttributeView
[<Android.Runtime.Register("java/nio/file/attribute/DosFileAttributeView", "", "Java.Nio.FileNio.Attributes.IDosFileAttributeViewInvoker", ApiSince=26)>]
type IDosFileAttributeView = interface
interface IBasicFileAttributeView
interface IFileAttributeView
interface IAttributeView
interface IJavaObject
interface IDisposable
interface IJavaPeerable
- 屬性
- 實作
備註
一個檔案屬性檢視,提供舊有「DOS」檔案屬性的視圖。 這些屬性由檔案系統支援,例如常見於 <em>消費性裝置</em> 的檔案配置表(File Allocation Table, FAT)格式。
A DosFileAttributeView 是 BasicFileAttributeView 額外支援存取用於指示檔案為唯讀、隱藏、系統檔案或已封存的 DOS 屬性標誌集合的 a。
當需要對檔案屬性進行動態存取時,此屬性檢視所支援的屬性依定義為 BasicFileAttributeView,此外,支援以下屬性:<blockquote<>table class=“striped”><caption style=“display:none”>Supported attributes</caption><thead><tr<>th scope=“col”> Name </th><th scope=“col”> 類型 </th></tr<>/thead><tbody><翻譯><th scope =「row」>讀取 /th<>td><Boolean/td<>/tr><tr<>th scope =「row」>隱藏 </th<>tdBoolean<>/td<>/tr><tr><th scope =「row」>系統 </th><tdBoolean<>/<>td/tr><tr th><scope =「row」> archive </th<>TDBoolean></TD<>/TR></TBODY/><<表格></引用>
java.nio.file.Files#getAttribute getAttribute此方法可用於讀取這些屬性中的任意一個,或由 定義BasicFileAttributeView的任意屬性,就像呼叫該#readAttributes readAttributes()方法一樣。
此 java.nio.file.Files#setAttribute setAttribute 方法可用於更新檔案的最後修改時間、最後存取時間,或依定義 BasicFileAttributeView建立時間屬性。 它也可用於更新 DOS 屬性,分別呼叫 #setReadOnly setReadOnly、 #setHidden setHidden、 #setSystem setSystem和 #setArchive setArchive 方法。
在 1.7 版本中加入。
的 java.nio.file.attribute.DosFileAttributeViewJava 檔。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
屬性
| 名稱 | Description |
|---|---|
| Handle |
取得底層 Android 物件的 JNI 值。 (繼承來源 IJavaObject) |
| JniIdentityHashCode |
回傳包裹實例的 |
| JniManagedPeerState |
管理貴族的狀況。 (繼承來源 IJavaPeerable) |
| JniObjectReferenceControlBlock |
一個檔案屬性檢視,提供舊有「DOS」檔案屬性的視圖。 (繼承來源 IJavaPeerable) |
| JniPeerMembers |
成員存取與召喚支援。 (繼承來源 IJavaPeerable) |
| PeerReference |
回傳JniObjectReference包裹後的 Java 物件實例。 (繼承來源 IJavaPeerable) |
方法
| 名稱 | Description |
|---|---|
| Disposed() |
當實例被處理後才被召喚。 (繼承來源 IJavaPeerable) |
| DisposeUnlessReferenced() |
如果沒有未解決的參考資料,則 |
| Finalized() |
當實例完成後才會被通知。 (繼承來源 IJavaPeerable) |
| Name() |
回傳屬性檢視的名稱。 |
| ReadAttributes() |
讀取 DOS 檔案屬性作為一個 bulk 操作。 |
| SetArchive(Boolean) |
更新 archive 屬性的值。 |
| SetHidden(Boolean) |
更新隱藏屬性的值。 |
| SetJniIdentityHashCode(Int32) |
將回傳的值設為 |
| SetJniManagedPeerState(JniManagedPeerStates) |
一個檔案屬性檢視,提供舊有「DOS」檔案屬性的視圖。 (繼承來源 IJavaPeerable) |
| SetPeerReference(JniObjectReference) |
將回傳的值設為 |
| SetReadOnly(Boolean) |
更新唯讀屬性的值。 |
| SetSystem(Boolean) |
更新系統屬性的值。 |
| SetTimes(FileTime, FileTime, FileTime) |
更新檔案中最後修改時間、最後存取時間,並建立時間屬性。 (繼承來源 IBasicFileAttributeView) |
| UnregisterFromRuntime() |
取消註冊此實例,讓執行時不會在未來 Java.Interop.JniRuntime+JniValueManager.PeekValue 的呼叫中回傳該實例。 (繼承來源 IJavaPeerable) |
擴充方法
| 名稱 | Description |
|---|---|
| GetJniTypeName(IJavaPeerable) |
取得實例 |
| JavaAs<TResult>(IJavaPeerable) |
試著強制 |
| JavaCast<TResult>(IJavaObject) |
執行 Android 執行時檢查型別轉換。 |
| JavaCast<TResult>(IJavaObject) |
一個檔案屬性檢視,提供舊有「DOS」檔案屬性的視圖。 |
| TryJavaCast<TResult>(IJavaPeerable, TResult) |
試著強制 |