Migrating Conditional Rules
Overview
FileBrowser Quantum v0.8.9 introduces a new, simplified conditional rules format. The old exclude
/include
configuration has been replaced with a unified conditionals
structure that is more flexible and easier to maintain.
Migration Required: If you’re upgrading from a version prior to v0.8.9, you’ll need to update your configuration file to use the new format.
Quick Comparison
Here’s a side-by-side comparison of the old and new formats:
❌ Old Format (Pre v0.8.9)
sources:
- path: "/data"
config:
exclude:
folderPaths:
- "excluded"
- "backup"
fileNames:
- ".DS_Store"
✅ New Format (v0.8.9+)
sources:
- path: "/data"
config:
conditionals:
rules:
- folderPath: "excluded"
- folderPath: "backup"
- fileNames: ".DS_Store"
Key Difference: Instead of arrays of strings grouped by type, each rule is now an individual object with specific properties.
What Changed?
Old Structure (Pre v0.8.9)
The old format used separate arrays for different exclusion/inclusion types:
server:
sources:
- path: "/data"
config:
exclude:
hidden: true
ignoreZeroSizeFolders: false
filePaths:
- "folder1/file.txt"
folderPaths:
- "excluded"
- "backup"
fileNames:
- ".DS_Store"
folderNames:
- "@eadir"
fileEndsWith:
- ".tmp"
New Structure (v0.8.9+)
The new format uses a single rules
array where each rule is an object:
server:
sources:
- path: "/data"
config:
conditionals:
hidden: true
ignoreZeroSizeFolders: false
rules:
- filePath: "folder1/file.txt"
- folderPath: "excluded"
- folderPath: "backup"
- fileNames: ".DS_Store"
- folderNames: "@eadir"
- fileEndsWith: ".tmp"
Migration Examples
Example 1: Basic Folder Exclusion
Example 2: Hidden Files and Global Exclusions
Example 3: Pattern-Based Exclusions
Example 4: Include Rules (Root Items Only)
Simplified: The new format combines both folder and file root items into a single includeRootItem
property.
Example 5: Advanced Configuration
Note: neverWatchPaths
has been moved into the rules array as individual neverWatchPath
entries.
Example 6: Viewable but Not Indexed
The new format introduces the viewable
property, which allows items to be visible in the UI but excluded from search indexing:
sources:
- path: "/data"
config:
conditionals:
rules:
- folderPath: "excludedButVisible"
viewable: true
- folderPath: "/subfolders/archived"
viewable: true
New Feature: The viewable: true
option is only available in the new format. It allows you to show items in the file browser without indexing them for search.
Complete Migration Reference
Old Format Properties → New Format Equivalents
Old Property | New Property | Notes |
---|---|---|
exclude.filePaths[] | rules[].filePath | One rule per path |
exclude.folderPaths[] | rules[].folderPath | One rule per path |
exclude.fileNames[] | rules[].fileNames | One rule per name |
exclude.folderNames[] | rules[].folderNames | One rule per name |
exclude.fileEndsWith[] | rules[].fileEndsWith | One rule per suffix |
exclude.folderEndsWith[] | rules[].folderEndsWith | One rule per suffix |
exclude.fileStartsWith[] | rules[].fileStartsWith | One rule per prefix |
exclude.folderStartsWith[] | rules[].folderStartsWith | One rule per prefix |
exclude.hidden | conditionals.hidden | Moved up one level |
exclude.ignoreZeroSizeFolders | conditionals.ignoreZeroSizeFolders | Moved up one level |
neverWatchPaths[] | rules[].neverWatchPath | Moved into rules |
include.rootFolders[] | rules[].includeRootItem | Combined with rootFiles |
include.rootFiles[] | rules[].includeRootItem | Combined with rootFolders |
(not available) | rules[].viewable | New property |
Migration Steps
Follow these steps to migrate your configuration:
Backup your config file
cp config.yaml config.yaml.backup
Locate your sources in the config file
For each source with
exclude
orinclude
:- Replace
exclude:
orinclude:
withconditionals:
- Move
hidden
andignoreZeroSizeFolders
up one level (if present) - Create a
rules:
array - Convert each array entry into an individual rule object
- Replace
Convert
neverWatchPaths
:- Move from source-level to inside
rules
array - Create one
neverWatchPath
rule per entry
- Move from source-level to inside
Convert
include.rootFolders
andinclude.rootFiles
:- Combine into single
includeRootItem
rules
- Combine into single
Test your configuration
./filebrowser config check config.yaml