 | CommonGetVerifiedFilePath Method (String, IEnumerableString, ActionException, DictionaryString, Object) |
Verifies a stored file path without changing it against the supplied allowed roots.
Namespace:
IAS
Assembly:
Common (in Common.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static string GetVerifiedFilePath(
string storedFileValue,
IEnumerable<string> allowedRoots,
Action<Exception, Dictionary<string, Object>> reportError = null
)
Public Shared Function GetVerifiedFilePath (
storedFileValue As String,
allowedRoots As IEnumerable(Of String),
Optional reportError As Action(Of Exception, Dictionary(Of String, Object)) = Nothing
) As String
public static function GetVerifiedFilePath(
storedFileValue : String,
allowedRoots : IEnumerable<String>,
reportError : Action<Exception, Dictionary<String, Object>>
) : String
IAS.Common.GetVerifiedFilePath = function(storedFileValue, allowedRoots, reportError);
Parameters
- storedFileValue
- Type: SystemString
The stored full path to the file. - allowedRoots
- Type: System.Collections.GenericIEnumerableString
The trusted root directories the file may reside under. - reportError (Optional)
- Type: SystemActionException, DictionaryString, Object
Receives each rejection with the requested path. Defaults to Raygun.
Return Value
Type:
StringThe stored value, unchanged.
See Also