RecentFiles

public static class RecentFiles
Provides access to the list of recently opened files.

Methods

AddFile

#
public static void AddFile(string file, State state)
Add a file to the recent file list.
file (string)
state (RecentFiles.State)

GetFiles

#
public static RecentFiles.File[] GetFiles()
Gets an array of recent files, sorted from most recent to least recent. Note that this method does not check whether or not the files do in fact still exist, that is the responsibility of the caller.
Array of recent files.

GetFilesByPeriod

#
public static (List<RecentFiles.File> files, string label)[] GetFilesByPeriod()
Get all recent files sorted by various periods. This method checks for the existence of files.

GetRelevantDate

#
public static bool GetRelevantDate(string path, out DateTime date, out State state)
Find the date and state of a recent file.
path (string)
date (out DateTime)
state (out RecentFiles.State)

PurgeFile

#
public static bool PurgeFile(string file)
Remove a file path from the history.
file (string)