Transfer Filter Configuration
This document describes the file filtering system that prevents problematic files from being transferred between cloud storage services using rclone.
Overview
The transfer filter system automatically identifies and skips files that rclone cannot properly transfer between cloud storage services. This prevents transfer failures, data corruption, and unexpected behavior.
Configuration File
The filter rules are defined in src/config/transfer-filters.ts. This file contains:
- Filter Rule Definitions: Structured rules that define which files to skip.
- Categories: Logical groupings of related filter rules.
- Utility Functions: Helper functions for working with filter rules.
Filter Rule Types
1. Extension-based Filters
Skip files based on their file extension:
{
type: 'extension',
value: 'lnk',
reason: 'Windows .lnk shortcut files are not preserved as shortcuts during transfer',
category: 'Symbolic Links & Shortcuts',
}
2. MIME Type Filters
Skip files based on their MIME type:
{
type: 'mimeType',
value: 'application/vnd.google-apps.form',
reason: 'Google Forms cannot be exported or transferred to other services',
category: 'Google Workspace Non-Exportable',
}
3. Filename Filters
Skip files with specific names:
{
type: 'filename',
value: '.DS_Store',
reason: 'macOS metadata files are not useful on other platforms',
category: 'Platform-Specific Files',
}
4. Pattern Filters
Skip files matching regex patterns:
{
type: 'pattern',
value: '.*\\._.*',
reason: 'macOS resource fork files (._filename) lose their special properties during transfer',
category: 'Platform-Specific Files',
}