Skip to content
R edited this page Dec 27, 2021 · 4 revisions

Redirecting files

Availability

4.0.0+

Use cases

  • I have some files that are not required by the server but are needed in a specific location on the client.
  • I have files on the server that should be in a different location on the client.

How

Add an entry to the redirect list of serversync-server.json

{
  "rules": {
    "files": {
      "include": [
        "cool_stuff/**"
      ]
      "redirect": [
        { "pattern": "cool_stuff/**", "redirectTo": "mods/cool_mod" }
      ]
    }
  }
}

This will take files that match the provided glob pattern and sync them to the provided location instead.

Limitations

  • Redirects are relative to 'root', i.e. where serversync is executing, they can not move files higher than that (intentional)
  • .. is not supported