diff options
author | katherine <shmibs@airen-no-jikken.icu> | 2018-11-30 04:41:03 -0700 |
---|---|---|
committer | katherine <shmibs@airen-no-jikken.icu> | 2018-11-30 04:41:03 -0700 |
commit | 262bf71320e3fa15f57cf91ff06ba05cf7097e5a (patch) | |
tree | 2bb3a1581ca7144d49aeb0b3c6e3dfdd17e5b2b6 | |
parent | 72dcba75b14d3f6d3766a1ce38d3ca56702cc95e (diff) | |
download | xdg_basedir-262bf71320e3fa15f57cf91ff06ba05cf7097e5a.tar.gz |
revise documentation for clarity
-rw-r--r-- | README.md | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,3 +1,4 @@ + xdg_basedir =========== @@ -36,9 +37,9 @@ usage Suppose you're writing a program called `program_name`, and you want to read one of its configuration files, `file_name.conf`. After reading, you want to -first perform some operation on the contents of the file and then write the new -contents back to `file_name.conf`. Using this module, that might look something -like the following: +perform some operation on the contents of the file, and then you want to write +the new contents back to `file_name.conf`. Using this module, that might look +something like the following: ```crystal require "xdg_basedir" @@ -47,8 +48,9 @@ require "xdg_basedir" # calls to File.read and File.write # files within the XDG Base Directories will typically be further sorted into -# subdirectories, with those directories named for the program or application -# which `owns` them. This is not always the case however, and so isn't enforced +# subdirectories, with those subdirectories named for the program or +# application which "owns" them. This is not always the case however, and so it +# isn't enforced read_path = XDGBasedir.full_path("program_name/file_name.conf", :config, :read) # the specification dictates that the locations of base directories should be |