Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
quinnj authored Feb 13, 2018
1 parent 10c7a63 commit 4777243
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,44 @@
[![Build Status](https://travis-ci.org/JuliaIO/IniFile.jl.svg?branch=master)](https://travis-ci.org/JuliaIO/IniFile.jl)

Reading and writing Windows-style INI files from Julia

## Usage

```julia
Pkg.add("IniFile") # first-time only
using Inifile # load code into current session
```

#### Create IniFile
```julia
ini = IniFile()
```

#### Get defaults & sections of an IniFile
```julia
sections(ini)
defaults(ini)
```

#### Get specific key from section, return `default` if not found
```julia
get(ini, "section", "key", default)
```

#### Set key for section
```julia
set(ini, "section", "key", value)
```

#### Parse a `*.ini` file
```julia
ini = read(IniFile(), "file.ini")
```

#### Write out a `*.ini` file
```julia
open("file.ini", "w+") do io
write(io, ini)
end
```

0 comments on commit 4777243

Please sign in to comment.