System.IO.FileSystem.SetCreationTime C# (CSharp) Méthode

SetCreationTime() public abstract méthode

public abstract SetCreationTime ( string fullPath, DateTimeOffset time, bool asDirectory ) : void
fullPath string
time DateTimeOffset
asDirectory bool
Résultat void
        public abstract void SetCreationTime(string fullPath, DateTimeOffset time, bool asDirectory);
        public abstract DateTimeOffset GetLastAccessTime(string fullPath);

Usage Example

        public static void SetCreationTimeUtc(string path, DateTime creationTimeUtc)
        {
            string fullPath = Path.GetFullPath(path);

            FileSystem.SetCreationTime(fullPath, File.GetUtcDateTimeOffset(creationTimeUtc), asDirectory: true);
        }
All Usage Examples Of System.IO.FileSystem::SetCreationTime