Skip to content

Ignore & include lists examples

R edited this page Jan 21, 2021 · 10 revisions

Include the folder bob in the bobs-things folder

JSON format (3.7+)

{
  "files": {
    "include": ["bobs-things/bob/**"]
    "ignore": []
  }
}

Old style config

S:DIRECTORY_INCLUDE_LIST <
   bobs-things/bob
>

Files that would be included:

  • bobs-things/bob/foobar.jar
  • bobs-things/bob/cool-stuff/bing.jar

Files that would not be included:

  • bobs-things/all-about-this.txt

Ignore all .disabled files

JSON format (3.7+)

{
  "files": {
    "ignore": ["**/*.disabled"]
  }
}

Old style config

S:FILE_IGNORE_LIST <
   **/*.disabled
>

**/ - Any folder

*.disabled - Any file that ends with .disabled

Examples files this pattern would match:

  • foobar.disabled
  • foobar.bing.disabled

Example files this pattern would not match:

  • foobar.disabled.bing
  • foobar.jar

Ignore all files with dangerous somewhere in the name

JSON format (3.7+)

{
  "files": {
    "ignore": ["**/*dangerous*"]
  }
}

Old style config

S:FILE_IGNORE_LIST <
   **/*dangerous*
>

**/ - Any folder

*dangerous* - Any file that has dangerous somewhere in its name

Examples files this pattern would match:

  • foobar-is-dangerous.jar
  • dangerous-file.cfg
  • thisfileisdangerousyo.jar
  • this-dangerous-file-should-be-ignored.jar

Example files this pattern would not match:

  • foobar.dangggerous.jar
  • foobar.disabled.bing
  • foobar.jar

Ignore the file bobs-mod.jar in the mods folder

JSON format (3.7+)

{
  "files": {
    "ignore": ["mods/bobs-mod.jar"]
  }
}

Old style config

S:FILE_IGNORE_LIST <
   mods/bobs-mod.jar
>

mods/ - Specifically the mods folder (not sub folders)

bobs-mod.jar - Specifically the file that has the name bobs-mod.jar

Examples files this pattern would match:

  • mods/bobs-mod.jar

Example files this pattern would not match:

  • config/bobs-mod.jar
  • mods/bobs-cool-mod.jar
  • mods/things/bobs-mod.jar