Share via


FileTime.From Method

Definition

Overloads

From(Instant)

Returns a FileTime representing the same point of time value on the time-line as the provided Instant object.

From(Int64, TimeUnit)

Returns a FileTime representing a value at the given unit of granularity.

From(Instant)

Returns a FileTime representing the same point of time value on the time-line as the provided Instant object.

[Android.Runtime.Register("from", "(Ljava/time/Instant;)Ljava/nio/file/attribute/FileTime;", "", ApiSince=26)]
public static Java.Nio.FileNio.Attributes.FileTime? From (Java.Time.Instant? instant);
[<Android.Runtime.Register("from", "(Ljava/time/Instant;)Ljava/nio/file/attribute/FileTime;", "", ApiSince=26)>]
static member From : Java.Time.Instant -> Java.Nio.FileNio.Attributes.FileTime

Parameters

instant
Instant

the instant to convert

Returns

a FileTime representing the same point on the time-line as the provided instant

Attributes

Remarks

Returns a FileTime representing the same point of time value on the time-line as the provided Instant object.

Added in 1.8.

Java documentation for java.nio.file.attribute.FileTime.from(java.time.Instant).

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

From(Int64, TimeUnit)

Returns a FileTime representing a value at the given unit of granularity.

[Android.Runtime.Register("from", "(JLjava/util/concurrent/TimeUnit;)Ljava/nio/file/attribute/FileTime;", "", ApiSince=26)]
public static Java.Nio.FileNio.Attributes.FileTime? From (long value, Java.Util.Concurrent.TimeUnit? unit);
[<Android.Runtime.Register("from", "(JLjava/util/concurrent/TimeUnit;)Ljava/nio/file/attribute/FileTime;", "", ApiSince=26)>]
static member From : int64 * Java.Util.Concurrent.TimeUnit -> Java.Nio.FileNio.Attributes.FileTime

Parameters

value
Int64

the value since the epoch (1970-01-01T00:00:00Z); can be negative

unit
TimeUnit

the unit of granularity to interpret the value

Returns

a FileTime representing the given value

Attributes

Remarks

Returns a FileTime representing a value at the given unit of granularity.

Java documentation for java.nio.file.attribute.FileTime.from(long, java.util.concurrent.TimeUnit).

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