IBasicFileAttributeView 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
一個檔案屬性檢視,提供許多檔案系統共有的基本檔案屬性集合/em< 視圖。><>
[Android.Runtime.Register("java/nio/file/attribute/BasicFileAttributeView", "", "Java.Nio.FileNio.Attributes.IBasicFileAttributeViewInvoker", ApiSince=26)]
public interface IBasicFileAttributeView : IDisposable, Java.Interop.IJavaPeerable, Java.Nio.FileNio.Attributes.IFileAttributeView
[<Android.Runtime.Register("java/nio/file/attribute/BasicFileAttributeView", "", "Java.Nio.FileNio.Attributes.IBasicFileAttributeViewInvoker", ApiSince=26)>]
type IBasicFileAttributeView = interface
interface IFileAttributeView
interface IAttributeView
interface IJavaObject
interface IDisposable
interface IJavaPeerable
- 衍生
- 屬性
- 實作
備註
一個檔案屬性檢視,提供許多檔案系統共有的基本檔案屬性集合/em< 視圖。><> 基本的檔案屬性集合包括 <em>mandatory</em> 與 <em>optional</em> 檔案屬性,依照介面 BasicFileAttributes 定義。
檔案屬性透過呼叫<該方法,從檔案系統>以 em<bulk 操作>/em#readAttributes() readAttributes 形式取得。 此類別同時定義 #setTimes setTimes 更新檔案時間屬性的方法。
當需要動態存取檔案屬性時,此屬性檢視所支援的屬性名稱與類型如下:<blockquote><table class=“striped”caption>< style=“display:none”>Supported attributes</caption><thead><tr><th scope=“col”> Name </th><th scope=“col”> 類型 </th><></thead><tbody><tr><scope = “row”>lastModifiedTime“ </th><td>FileTime</td></tr><tr th><scope=”row“> ”lastAccessTime“ </th><td>FileTime</td></tr><tr><th scope =”row“> ”creationTime“ </th><td>FileTime</td></tr><tr th><scope = ”row“> ”size“ </th><td>Long</td></tr tr><><th scope=“row”> “isRegularFile” </th><td>Boolean</td></tr><tr th><scope = “row”> “isDirectory” </th><td>Boolean</td></tr><tr><th scope=“row”> “isSymbolicLink” </th><td>Boolean</td></tr><tr><th scope=“row”> “isOther” </th><td>Boolean</結束></tr><tr><th scope=“row”> “fileKey” </th><td>Object</td></tr></tbody></table></blockquote>
java.nio.file.Files#getAttribute getAttribute此方法可透過呼叫方法來讀取這些屬性#readAttributes() readAttributes()。
java.nio.file.Files#setAttribute setAttribute此方法可用於更新檔案的最後修改時間、最後存取時間,或建立時間屬性,就像呼叫該#setTimes setTimes方法一樣。
在 1.7 版本中加入。
Java 文件 java.nio.file.attribute.BasicFileAttributeView。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
屬性
| 名稱 | Description |
|---|---|
| Handle |
取得底層 Android 物件的 JNI 值。 (繼承來源 IJavaObject) |
| JniIdentityHashCode |
回傳包裹實例的 |
| JniManagedPeerState |
管理貴族的狀況。 (繼承來源 IJavaPeerable) |
| JniObjectReferenceControlBlock |
一個檔案屬性檢視,提供許多檔案系統共有的基本檔案屬性集合/em< 視圖。><> (繼承來源 IJavaPeerable) |
| JniPeerMembers |
成員存取與召喚支援。 (繼承來源 IJavaPeerable) |
| PeerReference |
回傳JniObjectReference包裹後的 Java 物件實例。 (繼承來源 IJavaPeerable) |
方法
| 名稱 | Description |
|---|---|
| Disposed() |
當實例被處理後才被召喚。 (繼承來源 IJavaPeerable) |
| DisposeUnlessReferenced() |
如果沒有未解決的參考資料,則 |
| Finalized() |
當實例完成後才會被通知。 (繼承來源 IJavaPeerable) |
| Name() |
回傳屬性檢視的名稱。 |
| ReadAttributes() |
將基本檔案屬性讀取為一個批量操作。 |
| SetJniIdentityHashCode(Int32) |
將回傳的值設為 |
| SetJniManagedPeerState(JniManagedPeerStates) |
一個檔案屬性檢視,提供許多檔案系統共有的基本檔案屬性集合/em< 視圖。><> (繼承來源 IJavaPeerable) |
| SetPeerReference(JniObjectReference) |
將回傳的值設為 |
| SetTimes(FileTime, FileTime, FileTime) |
更新檔案中最後修改時間、最後存取時間,並建立時間屬性。 |
| UnregisterFromRuntime() |
取消註冊此實例,讓執行時不會在未來 Java.Interop.JniRuntime+JniValueManager.PeekValue 的呼叫中回傳該實例。 (繼承來源 IJavaPeerable) |
擴充方法
| 名稱 | Description |
|---|---|
| GetJniTypeName(IJavaPeerable) |
取得實例 |
| JavaAs<TResult>(IJavaPeerable) |
試著強制 |
| JavaCast<TResult>(IJavaObject) |
執行 Android 執行時檢查型別轉換。 |
| JavaCast<TResult>(IJavaObject) |
一個檔案屬性檢視,提供許多檔案系統共有的基本檔案屬性集合/em< 視圖。><> |
| TryJavaCast<TResult>(IJavaPeerable, TResult) |
試著強制 |