Skip to content

Commit

Permalink
Add api documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewchambers committed May 8, 2020
1 parent 9711eec commit 5ad3e84
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
50 changes: 50 additions & 0 deletions API.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# flock

## flock/acquire
type: cfunction

[flock.c#L57](flock.c#L57)

```
(flock/acquire path wait-mode mode &opt flock)
Open (potentially creating the file) an flock at path,with waitmode :block|:noblock and
mode :shared|:exclusive. Returns the lock, if the lock is non blocking, returns nil is
thelock was already held in an incompatible way.
```

## flock/locked?
type: cfunction

[flock.c#L111](flock.c#L111)

```
(flock/locked? l)
Check if the lock object has aquired a lock.
```

## flock/new
type: cfunction

[flock.c#L48](flock.c#L48)

```
(flock/new)
Create a new flock that is not locked or associated with any file.
```

## flock/release
type: cfunction

[flock.c#L117](flock.c#L117)

```
(flock/release l)
Release file lock.
```


Docs generated by: https://github.com/andrewchambers/janet-md-doc
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ Simple file locking with flock for janet.
...)
```

## API

[here](API.md)

0 comments on commit 5ad3e84

Please sign in to comment.