RandomAccess.GetLength(SafeFileHandle) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得檔案長度(位元組)。
public:
static long GetLength(Microsoft::Win32::SafeHandles::SafeFileHandle ^ handle);
public static long GetLength(Microsoft.Win32.SafeHandles.SafeFileHandle handle);
static member GetLength : Microsoft.Win32.SafeHandles.SafeFileHandle -> int64
Public Shared Function GetLength (handle As SafeFileHandle) As Long
參數
- handle
- SafeFileHandle
檔句柄。
傳回
一個長值代表檔案長度(以位元組為單位)。
例外狀況
handle 是 null。
handle 無效。
檔案已結案。
該檔案不支援尋址(管道或套接字)。