File Time



  • These MEX-functions get and set the creation, access and write times of a file under Windows. SetFileTime(FileName, Spec, DateVector, Type) FileName: File or folder name, absolute or relative path.
  • FILETIME: 100-nanoseconds since Jan 1 1601: 6000004:8BC25000.

NTFS Timestamp Reports. These operating systems report timestamps in local time. However, conversion between UTC and local time is based on the difference between UTC and local time at the time of conversion, instead of that in effect when the file event occurred.Consequently, if daylight saving time is currently in effect, all file events around the year will be reported in DST.

< cpp‎ | filesystem
C++
Language
Standard Library Headers
Freestanding and hosted implementations
Named requirements
Language support library
Concepts library(C++20)
Diagnostics library
Utilities library
Strings library
Containers library
Iterators library
Ranges library(C++20)
Algorithms library
Numerics library
Localizations library
Input/output library
Filesystem library(C++17)
Regular expressions library(C++11)
Atomic operations library(C++11)
Thread support library(C++11)
Technical Specifications
Filesystem library

File Timestamp Python

Filetime to utc
Classes
Functions
File types
Defined in header <filesystem>
using file_time_type =std::chrono::time_point</*trivial-clock*/>;
(since C++17)
(until C++20)
using file_time_type =std::chrono::time_point<std::chrono::file_clock>;
(since C++20)

Represents file time.

trivial-clock is an implementation-defined type that satisfies TrivialClock and is sufficient to represent the resolution and range of the file time values offered by the filesystem.

(until C++20)

[edit]Example

Filetimetosystemtime

Possible output:

[edit]See also

(C++17)
gets or sets the time of the last data modification
(function)[edit]

File Time Editor

Retrieved from 'https://en.cppreference.com/mwiki/index.php?title=cpp/filesystem/file_time_type&oldid=103430'
JavaScript is disabled on your browser.
  • Class

File Timestamp Format

Class FileTime

    • java.nio.file.attribute.FileTime
  • All Implemented Interfaces:
    Comparable<FileTime>

    Represents the value of a file's time stamp attribute. For example, it may represent the time that the file was last modified, accessed, or created.

    Instances of this class are immutable.

    Since:
    1.7
    See Also:
    Files.setLastModifiedTime(java.nio.file.Path, java.nio.file.attribute.FileTime), Files.getLastModifiedTime(java.nio.file.Path, java.nio.file.LinkOption...)
    • Method Summary

      Methods
      Modifier and TypeMethod and Description
      intcompareTo(FileTime other)
      Compares the value of two FileTime objects for order.
      booleanequals(Object obj)
      Tests this FileTime for equality with the given object.
      static FileTimefrom(long value, TimeUnit unit)
      Returns a FileTime representing a value at the given unit of granularity.
      static FileTimefromMillis(long value)
      Returns a FileTime representing the given value in milliseconds.
      inthashCode()
      longto(TimeUnit unit)
      Returns the value at the given unit of granularity.
      longtoMillis()
      StringtoString()
      Returns the string representation of this FileTime.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • from

        Returns a FileTime representing a value at the given unit of granularity.
        Parameters:
        value - the value since the epoch (1970-01-01T00:00:00Z); can be negative
        unit - the unit of granularity to interpret the value
        Returns:
        a FileTime representing the given value
      • fromMillis

        Returns a FileTime representing the given value in milliseconds.
        Parameters:
        value - the value, in milliseconds, since the epoch (1970-01-01T00:00:00Z); can be negative
        Returns:
        a FileTime representing the given value
      • to

        Returns the value at the given unit of granularity.

        Conversion from a coarser granularity that would numerically overflow saturate to Long.MIN_VALUE if negative or Long.MAX_VALUE if positive.

        Parameters:
        unit - the unit of granularity for the return value
        Returns:
        value in the given unit of granularity, since the epoch since the epoch (1970-01-01T00:00:00Z); can be negative
      • toMillis

        Returns the value in milliseconds.

        Conversion from a coarser granularity that would numerically overflow saturate to Long.MIN_VALUE if negative or Long.MAX_VALUE if positive.

        Returns:
        the value in milliseconds, since the epoch (1970-01-01T00:00:00Z)
      • equals

        Tests this FileTime for equality with the given object.

        The result is true if and only if the argument is not null and is a FileTime that represents the same time. This method satisfies the general contract of the Object.equals method.

        Overrides:
        equals in class Object
        Parameters:
        obj - the object to compare with
        Returns:
        true if, and only if, the given object is a FileTime that represents the same time
        See Also:
        Object.hashCode(), HashMap
      • hashCode

        Computes a hash code for this file time.

        The hash code is based upon the value represented, and satisfies the general contract of the Object.hashCode() method.

        Overrides:
        hashCode in class Object
        Returns:
        the hash-code value
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)
      • compareTo

        Compares the value of two FileTime objects for order.
        Specified by:
        compareTo in interface Comparable<FileTime>
        Parameters:
        other - the other FileTime to be compared
        Returns:
        0 if this FileTime is equal to other, a value less than 0 if this FileTime represents a time that is before other, and a value greater than 0 if this FileTime represents a time that is after other
      • toString

        Returns the string representation of this FileTime. The string is returned in the ISO 8601 format: where '[.s+]' represents a dot followed by one of more digits for the decimal fraction of a second. It is only present when the decimal fraction of a second is not zero. For example, FileTime.fromMillis(1234567890000L).toString() yields '2009-02-13T23:31:30Z', and FileTime.fromMillis(1234567890123L).toString() yields '2009-02-13T23:31:30.123Z'.

        A FileTime is primarily intended to represent the value of a file's time stamp. Where used to represent extreme values, where the year is less than '0001' or greater than '9999' then this method deviates from ISO 8601 in the same manner as the XML Schema language. That is, the year may be expanded to more than four digits and may be negative-signed. If more than four digits then leading zeros are not present. The year before '0001' is '-0001'.

        Overrides:
        toString in class Object
        Returns:
        the string representation of this file time
  • Class
File Time
  • Summary:
  • Nested |
  • Field |
  • Constr |

Texas Efile Time

File Time
  • Detail:
  • Field |
  • Constr |
File

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2020, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.

Scripting on this page tracks web page traffic, but does not change the content in any way.