System.IO.Abstractions.FileBase.GetCreationTimeUtc C# (CSharp) Méthode

GetCreationTimeUtc() public abstract méthode

Returns the creation date and time, in coordinated universal time (UTC), of the specified file or directory.

The path parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see DirectoryBase.GetCurrentDirectory.

If the file described in the path parameter does not exist, this method returns 12:00 midnight, January 1, 1601 A.D. (C.E.) Coordinated Universal Time (UTC).

NTFS-formatted drives may cache file meta-info, such as file creation time, for a short period of time, which is known as "file tunneling." As a result, it may be necessary to explicitly set the creation time of a file if you are overwriting or replacing an existing file.

The caller does not have the required permission. is empty, contains only white spaces, or contains invalid characters. is . The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters. is in an invalid format.
public abstract GetCreationTimeUtc ( string path ) : DateTime
path string The file or directory for which to obtain creation date and time information.
Résultat DateTime
        public abstract DateTime GetCreationTimeUtc(string path);