Class FileDateHelpers
Inheritance
FileDateHelpers
Assembly: Acoustics.Shared.dll
Syntax
public class FileDateHelpers
Fields
|
Improve this Doc
View Source
UnixEpoch
Declaration
public static readonly DateTimeOffset UnixEpoch
Field Value
Methods
|
Improve this Doc
View Source
FileNameContainsDateTime(String)
Declaration
public static bool FileNameContainsDateTime(string fileName)
Parameters
Type |
Name |
Description |
String |
fileName |
|
Returns
|
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
Returns
|
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
|
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
|
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
Returns
Type Parameters
Extension Methods