====== DIRS.INI ======

''*dirs.ini'' is the [[wp>INI file|.ini]] format Synchronet v3.22 and later use to share file directory (file area) configuration between Synchronet BBSes. It is the file-base counterpart of [[ref:subs.ini]], and it replaced an older Synchronet ''DIRS.TXT'' format that carried 20 lines per area -- see [[dev:chopping_block]].

[[util:SCFG]] imports and exports it from a file library's //Import Areas...// and //Export Areas...// format menus, listed as ''Synchronet  *dirs.ini''.

The ''*'' in the name is normally replaced with the file library's code prefix (''<prefix>dirs.ini''), or with the library's short name when it has no code prefix (''<short name>_dirs.ini'', with spaces converted to underscores).

Do not confuse this with the CD-ROM [[ref:dirs.txt]] listing, which is a different format that SCFG also still imports and exports.

===== Format =====

A standard ''.ini'' file with one section per file directory. The section name is the directory's internal code suffix:

<code ini>
[uploads]
description = User Uploads
name = Uploads
path = uploads/
upload_ars =
download_ars =
settings = 8cd
max_files = 1000
upload_credit_pct = 100
download_credit_pct = 90
</code>

Keys that are absent take their default value, so a hand-written file need only carry the settings that matter.

^ Key ^ Value ^
| ''description'' | Long name |
| ''name'' | Short name |
| ''path'' | Storage path, written with a trailing slash. Relative paths are resolved against the library's parent directory |
| ''data_dir'' | Data directory (blank for the default) |
| ''ars'' | Access requirements |
| ''upload_ars'' | Upload requirements |
| ''download_ars'' | Download requirements |
| ''operator_ars'' | Operator requirements |
| ''exempt_ars'' | Exemption requirements |
| ''area_tag'' | File area tag |
| ''vdir'' | Virtual directory name, used for SFTP and HTTP file browsing |
| ''vshortcut'' | Virtual directory shortcut |
| ''upload_sem'' | Upload semaphore file |
| ''extensions'' | Permitted file extensions, comma-separated (blank for all) |
| ''settings'' | Toggle options, as a hexadecimal value |
| ''seq_dev'' | Sequential (slow media) device number, ''0'' if not slow media |
| ''sort'' | File sort order |
| ''max_age'' | Maximum file age, in days (''0'' for no limit) |
| ''max_files'' | Maximum files |
| ''upload_credit_pct'' | Percentage credit awarded on upload |
| ''download_credit_pct'' | Percentage credit charged on download |

===== Notes =====

  * The last ten keys, from ''data_dir'' through ''download_credit_pct'', are the same set a file library carries as its //directory defaults//, so a directory that has never been customised exports values matching its library's defaults.
  * The section names here are bare internal code suffixes. This is not the same as the directory sections in the ''ctrl/file.ini'' configuration file, which are named ''dir:<library>:<code>''.
  * The matching format for message areas is [[ref:subs.ini]], offered by the same menus in a message group.

===== See Also =====
  * [[:ref:|ref index]]
  * [[ref:subs.ini]]
  * [[ref:dirs.txt]]
  * [[config:file_areas]]

{{tag>format}}
