Skip to content

Commit

Permalink
add doc for UserConfigDirOrDefault
Browse files Browse the repository at this point in the history
  • Loading branch information
dogancanbakir committed Jun 5, 2023
1 parent 85aeea4 commit 7575402
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion folder/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
# folderutil
The package contains various helpers to interact with folders
The package contains various helpers to interact with folders

## UserConfigDirOrDefault

UserConfigDirOrDefault returns the default root directory to use for user-specific configuration data. Users should create their own application-specific subdirectory within this one and use that.

On Unix systems, it returns $XDG_CONFIG_HOME as specified by https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html if non-empty, else $HOME/.config. On Darwin, it returns $HOME/Library/Application Support. On Windows, it returns %AppData%. On Plan 9, it returns $home/lib.

If the location cannot be determined (for example, $HOME is not defined), then it will return given value as default.

0 comments on commit 7575402

Please sign in to comment.