Sitecore 5.0 API

MainUtil.GetFileTime Method 

NOTE: This method is now obsolete.

Use FileUtil.GetFileTime instead


Gets the last modified time of a file.

[Visual Basic]
Public Shared Function GetFileTime( _
   ByVal filePath As String _
) As String
[C#]
public static string GetFileTime(
   string filePath
);

Parameters

filePath
A filename path.

Return Value

The last modified time of the file as a string.

Remarks

If the file does not have a last modified time, blank is returned.

Example

  string lastModified = MainUtil.GetFileTime("/robots.txt");

See Also

MainUtil Class | Sitecore Namespace