Search Results for

    Show / Hide Table of Contents

    Class FileDateHelpers

    Inheritance
    Object
    FileDateHelpers
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Acoustics.Shared
    Assembly: Acoustics.Shared.dll
    Syntax
    public class FileDateHelpers

    Fields

    | Improve this Doc View Source

    UnixEpoch

    Declaration
    public static readonly DateTimeOffset UnixEpoch
    Field Value
    Type Description
    DateTimeOffset

    Methods

    | Improve this Doc View Source

    FileNameContainsDateTime(String)

    Declaration
    public static bool FileNameContainsDateTime(string fileName)
    Parameters
    Type Name Description
    String fileName
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    FileNameContainsDateTime(String, out DateTimeOffset, Nullable<TimeSpan>)

    Declaration
    public static bool FileNameContainsDateTime(string fileName, out DateTimeOffset parsedDate, TimeSpan? offsetHint = default(TimeSpan? ))
    Parameters
    Type Name Description
    String fileName
    DateTimeOffset parsedDate
    Nullable<TimeSpan> offsetHint
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    FilterDirectoriesForDates(IEnumerable<DirectoryInfo>, Nullable<TimeSpan>)

    sorts a list of files by the date assumed to be encoded in their file names and then returns the list as a sorted dictionary with file DateTime as the keys.

    Declaration
    public static SortedDictionary<DateTimeOffset, DirectoryInfo> FilterDirectoriesForDates(IEnumerable<DirectoryInfo> directories, TimeSpan? offsetHint = default(TimeSpan? ))
    Parameters
    Type Name Description
    IEnumerable<DirectoryInfo> directories

    The files to filter.

    Nullable<TimeSpan> offsetHint

    If you know what timezone you should have, specify a hint to enable parsing of ambiguous dates.

    Returns
    Type Description
    SortedDictionary<DateTimeOffset, DirectoryInfo>

    A sorted dictionary FileInfo objects mapped to parsed dates.

    | Improve this Doc View Source

    FilterFilesForDates(IEnumerable<FileInfo>, Nullable<TimeSpan>)

    sorts a list of files by the date assumed to be encoded in their file names and then returns the list as a sorted dictionary with file DateTime as the keys.

    Declaration
    public static SortedDictionary<DateTimeOffset, FileInfo> FilterFilesForDates(IEnumerable<FileInfo> files, TimeSpan? offsetHint = default(TimeSpan? ))
    Parameters
    Type Name Description
    IEnumerable<FileInfo> files

    The files to filter.

    Nullable<TimeSpan> offsetHint

    If you know what timezone you should have, specify a hint to enable parsing of ambiguous dates.

    Returns
    Type Description
    SortedDictionary<DateTimeOffset, FileInfo>

    A sorted dictionary FileInfo objects mapped to parsed dates.

    | Improve this Doc View Source

    FilterObjectsForDates<T>(IEnumerable<T>, Func<T, FileSystemInfo>, Func<T, Nullable<DateTimeOffset>>, Nullable<TimeSpan>)

    sorts a list of files by the date assumed to be encoded in their file names and then returns the list as a sorted dictionary with file DateTime as the keys.

    Declaration
    public static SortedDictionary<DateTimeOffset, T> FilterObjectsForDates<T>(IEnumerable<T> objects, Func<T, FileSystemInfo> pathSelector, Func<T, DateTimeOffset?> overrideSelector, TimeSpan? offsetHint = default(TimeSpan? ))
    Parameters
    Type Name Description
    IEnumerable<T> objects
    Func<T, FileSystemInfo> pathSelector
    Func<T, Nullable<DateTimeOffset>> overrideSelector
    Nullable<TimeSpan> offsetHint

    If you know what timezone you should have, specify a hint to enable parsing of ambiguous dates.

    Returns
    Type Description
    SortedDictionary<DateTimeOffset, T>

    A sorted dictionary FileInfo objects mapped to parsed dates.

    Type Parameters
    Name Description
    T

    Extension Methods

    ObjectExtensions.NotNull(Object)
    ObjectExtensions.AsArray<T>(T)
    ObjectExtensions.AsList<T>(T)
    ObjectExtensions.Wrap<T>(T)
    SystemExtensions.BinarySerialize(Object)
    ConfigFileExtensions.NotNull(Object, FileInfo, String, String)
    ConfigFileExtensions.ValidateNotNull(Object, String, String)
    ConfigFileExtensions.ValidateLessThan<T>(Object, Nullable<T>, String, Nullable<T>, String, String)
    ExtensionsXml.SerializeObject<T>(T)
    • Improve this Doc
    • View Source
    In This Article
    Generated by DocFX AP docs version: 21.7.0.4-master-e26127a50d7bd7472d47288f10e61014fb981f7f-DIRTY-CI:144 Back to top