Path: redb-route/redb.Route.GenericFile/GenericFileEnums.cs
Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route.GenericFile/GenericFileEnums.cs
----
namespace redb.Route.GenericFile;
///
/// Strategy for how the producer handles an existing file at the target path.
/// Shared across all file-based transports (local, SFTP, FTP).
///
public enum GenericFileExistStrategy
{
/// Overwrite the existing file.
Override,
/// Append to the existing file.
Append,
/// Throw an exception if the file exists.
Fail,
/// Do nothing — silently skip writing if the file exists.
Ignore,
/// Move the existing file to a backup before writing the new one.
Move,
/// Try to rename the existing file before writing. Fail silently if rename fails.
TryRename
}
///
/// Sort criteria for ordering files during consumer polling.
/// Shared across all file-based transports (local, SFTP, FTP).
///
public enum GenericFileSortBy
{
/// No sorting — OS/server-native order.
None,
/// Sort by file name ascending (A → Z).
Name,
/// Sort by file name descending (Z → A).
NameDesc,
/// Sort by last modified time ascending (oldest first).
Modified,
/// Sort by last modified time descending (newest first).
ModifiedDesc,
/// Sort by file size ascending (smallest first).
Size,
/// Sort by file size descending (largest first).
SizeDesc
}