No description
Find a file
2026-01-22 16:34:37 +03:00
config Loglamada düzenleme 2020-08-15 12:38:37 +03:00
database Loglamada düzenleme 2020-08-15 12:38:37 +03:00
filesystem Uygulama, Windows servisine dönüştürüldü. 2020-07-23 16:45:11 +03:00
scheduler Loglamada düzenleme 2020-08-18 14:29:34 +03:00
util Uygulama, Windows servisine dönüştürüldü. 2020-07-23 16:45:11 +03:00
.gitignore Initial commit 2020-07-23 14:08:05 +03:00
fs-watcher.iml Initial commit 2020-07-23 14:08:05 +03:00
go.mod Uygulama, Windows servisine dönüştürüldü. 2020-07-23 16:45:11 +03:00
go.sum Uygulama, Windows servisine dönüştürüldü. 2020-07-23 16:45:11 +03:00
LICENSE docs: improve README.md and added LICENSE 2026-01-22 16:33:36 +03:00
main.go Uygulama, Windows servisine dönüştürüldü. 2020-07-23 16:45:11 +03:00
README.md docs: improve documentation on README.md 2026-01-22 16:34:37 +03:00

Contributors

Forks Stargazers Issues GPL License

Readme in English

fs-watcher

fs-watcher monitors filesystem changes, stores events in an embedded NoSQL database, and runs scheduled cleanup tasks (currently delete) for files/directories older than a configured age. It is designed to run as a Windows service.

Table of Contents


Tools

  • watcher
    • Recursively watches configured paths for create/remove/rename/move events.
  • database
    • Persists file records (Path, Created, IsDir) in a tiedot collection.
  • scheduler
    • Runs configured tasks at intervals; supports age-based deletion.

Configuration

Default config path:

%PROGRAMFILES%\fs-watcher\config.yml

You can copy the sample and adjust it:

config/config.sample.yml

Example:

paths:
  - C:\Users\Administrator\Desktop
  - D:\
tasks:
  - action: delete
    interval: 3600
    filter:
      createdBefore: 604800

Notes:

  • interval and createdBefore are in seconds.
  • Set createdBefore: 0 to disable the age filter.

Installation (Windows)

  1. Create %PROGRAMFILES%\fs-watcher.
  2. Copy fs-watcher.exe into %PROGRAMFILES%\fs-watcher.
  3. Create %PROGRAMFILES%\fs-watcher\config.yml (see config/config.sample.yml).
  4. Open PowerShell as Administrator and run:
PS C:\WINDOWS\system32> cd 'C:\Program Files\fs-watcher\'
PS C:\Program Files\fs-watcher> .\fs-watcher.exe --service install
PS C:\Program Files\fs-watcher> .\fs-watcher.exe --service start

Usage

Run in the foreground:

fs-watcher.exe

Service Management

Install and run as a Windows service:

fs-watcher.exe -service install
fs-watcher.exe -service start

Other common actions: stop, restart, uninstall.


Building

go build ./...

License

fs-watcher is licensed under GPL-3.0-only. See LICENSE for details.