Udostępnij za pośrednictwem


Files.Size(IPath) Method

Definition

Returns the size of a file (in bytes).

[Android.Runtime.Register("size", "(Ljava/nio/file/Path;)J", "", ApiSince=26)]
public static long Size (Java.Nio.FileNio.IPath? path);
[<Android.Runtime.Register("size", "(Ljava/nio/file/Path;)J", "", ApiSince=26)>]
static member Size : Java.Nio.FileNio.IPath -> int64

Parameters

path
IPath

the path to the file

Returns

the file size, in bytes

Attributes

Remarks

Returns the size of a file (in bytes). The size may differ from the actual size on the file system due to compression, support for sparse files, or other reasons. The size of files that are not #isRegularFile regular files is implementation specific and therefore unspecified.

Java documentation for java.nio.file.Files.size(java.nio.file.Path).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to