Class GenericFileUtils
Shared utilities for file-based transports: glob matching, done-file resolution.
public static class GenericFileUtils
Inheritance
Methods
AntMatch(string, string, bool)
Ant-style path matching, as Apache Camel's antInclude/antExclude use it:
public static bool AntMatch(string relativePath, string pattern, bool caseSensitive = true)
GlobMatch(string, string)
Simple glob matching supporting * and ? wildcards.
public static bool GlobMatch(string input, string pattern)
IsWithinDirectory(string, string, char, StringComparison)
Tests whether a already-normalized path is the base directory itself or lives underneath it.
public static bool IsWithinDirectory(string basePath, string candidatePath, char separator, StringComparison comparison)
ResolveDoneFileName(GenericFileInfo, string, IFileOperations)
Resolves a done-file name pattern by substituting the file keys (\({file:name}</code>, <code>\){file:name.noext}
public static string ResolveDoneFileName(GenericFileInfo file, string doneFilePattern, IFileOperations ops)
SubstituteFileTokens(IFileFacts, string)
Substitutes the file keys of Apache Camel's file language (\({file:name}</code>, <code>\){file:name.noext},
public static string SubstituteFileTokens(IFileFacts facts, string pattern)
SubstituteFileTokens(string, string, IFileOperations)
The compatibility form of for a caller that has only the
public static string SubstituteFileTokens(string fileName, string pattern, IFileOperations ops)
ValidateFileKeys(string, string?)
Checks the file keys in a consumer option when the endpoint is created: a key that is not a file key would
public static void ValidateFileKeys(string option, string? pattern)