IBasicFileAttributeView 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
檔案屬性檢視,提供許多檔案系統通用之 em > 基本集合 < /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 > 檔案屬性的檢視 < 。 基本檔案屬性集包含 em 強制/em > 和 < em > 選擇性 < /em > 檔案屬性,如 介面所 BasicFileAttributes
定義。 <><
藉由叫用 方法,從檔案系統擷取檔案屬性作為 < em > 大量作業 < /em > 。 #readAttributes() readAttributes
這個類別也會定義 #setTimes setTimes
方法來更新檔案的時間屬性。
需要動態存取檔案屬性時,此屬性檢視支援的屬性具有下列名稱和類型: < blockquote >< 資料表類別=「striped」 <> 標題 style=「display:none」 > Supported attributes < /標題 >< thead >< tr >< th scope=「col」 Name < /th <> scope=「col」 >> Type < / >< th/tr <> /thead >< tbody ><Tr ><th scope=「row」 「lastModifiedTime」 > /th >< td ><FileTime
/td >< /tr >< tr >< th scope=「row」 「lastAccessTime」 <> / <> th td ><FileTime
/td >< /tr ><>< th scope=「row」 > 「creationTime」 < /th >< td FileTime
<> /td <> /tr <><> th scope=「row」 > 「size」 < /th <> td ><Long
/td >< /tr ><<Tr ><th scope=「row」 「isRegularFile」 > /th >< td ><Boolean
/td >< /tr >< th >< scope=「row」 > 「isDirectory」 < / <> th td <Boolean
> /td >< /tr >< th >< scope=「row」 > 「isSymbolicLink < 」 /th <> td Boolean
<> /td <> /tr tr <<>> th scope=「row」 > 「isOther」 < /th >< td >Boolean
<</Td ></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.nio.file.attribute.BasicFileAttributeView
JAVA 檔。
此頁面的部分是根據 原始碼專案所建立和共用的工作進行修改,並根據中所述的詞彙使用。
屬性
Handle |
取得基礎 Android 物件的 JNI 值。 (繼承來源 IJavaObject) |
JniIdentityHashCode |
傳回包裝實例的 |
JniManagedPeerState |
受控對等的狀態。 (繼承來源 IJavaPeerable) |
JniPeerMembers |
成員存取和調用支援。 (繼承來源 IJavaPeerable) |
PeerReference |
傳 JniObjectReference 回已包裝 JAVA 物件實例的 。 (繼承來源 IJavaPeerable) |
方法
Disposed() |
在處置實例時呼叫。 (繼承來源 IJavaPeerable) |
DisposeUnlessReferenced() |
如果沒有這個實例的未完成參考,則呼叫 |
Finalized() |
實例完成時呼叫。 (繼承來源 IJavaPeerable) |
Name() |
傳回屬性檢視的名稱。 |
ReadAttributes() |
以大量作業的形式讀取基本檔案屬性。 |
SetJniIdentityHashCode(Int32) |
設定 所 |
SetJniManagedPeerState(JniManagedPeerStates) |
檔案屬性檢視,提供許多檔案系統通用之 em > 基本集合 < /em > 檔案屬性的檢視 < 。 (繼承來源 IJavaPeerable) |
SetPeerReference(JniObjectReference) |
設定 所 |
SetTimes(FileTime, FileTime, FileTime) |
匯報任何或所有檔案的上次修改時間、上次存取時間,以及建立時間屬性。 |
UnregisterFromRuntime() |
取消註冊此實例,讓執行時間不會從未來的 Java.Interop.JniRuntime+JniValueManager.PeekValue 調用傳回它。 (繼承來源 IJavaPeerable) |
擴充方法
JavaCast<TResult>(IJavaObject) |
執行 Android 執行時間檢查的類型轉換。 |
JavaCast<TResult>(IJavaObject) |
檔案屬性檢視,提供許多檔案系統通用之 em > 基本集合 < /em > 檔案屬性的檢視 < 。 |
GetJniTypeName(IJavaPeerable) |
檔案屬性檢視,提供許多檔案系統通用之 em > 基本集合 < /em > 檔案屬性的檢視 < 。 |