Packages
kvs
9.9.0
13.5.22-aleph
13.4.16
13.4.15
13.4.14
13.4.13
13.3.1
13.2.28
11.9.1
10.8.3
10.8.2
10.3.0
9.9.2
9.9.1
9.9.0
9.8.0
9.7.0
9.4.8
9.4.7
9.4.6
9.4.5
9.4.4
9.4.3
9.4.2
9.4.1
9.4.0
8.12.0
8.11.2
8.11.1
8.10.4
8.10.3
8.10.2
8.10.1
8.10.0
8.5.2
8.5.1
8.5.0
8.4.1
8.4.0
8.3.1
8.3.0
7.11.5
7.9.1
7.7.0
7.1.3
7.1.2
7.1.1
6.12.11
6.12.10
6.12.9
6.12.8
6.12.7
6.12.6
6.12.5
6.12.4
6.12.3
6.12.2
6.12.1
6.12.0
6.11.2
6.11.1
6.11.0
6.10.2
6.10.1
6.10.0
6.9.2
6.9.1
6.9.0
6.7.7
6.7.6
6.7.5
6.7.4
6.7.3
6.7.2
6.7.1
6.7.0
6.6.0
2.1.0
0.12.1
retired
KVS Key-Value Store Abstraction Layer
Current section
Files
Jump to
Current section
Files
man/kvs_fs.htm
<!DOCTYPE html><html><head><meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="" /><meta name="author" content="Maxim Sokhatsky" />
<title>FS</title>
<link rel="stylesheet" href="https://n2o.dev/blank.css" />
<link rel="stylesheet" href="https://n2o.dev/zima.css" />
</head><body><nav>
<a href="https://n2o.dev">DEV</a>
<a href="https://kvs.n2o.dev">KVS</a>
<a href="#" style="background:#ededed;">FS</a>
<div class="dropdown">
<a onclick="drop()" class="dropbtn">EN</a>
<div id="dropdown" class="dropdown-content">
<a href="https://n2o.dev/ua/deps/kvs/man/kvs_fs.htm">UA</a>
<a href="#">EN</a>
</div>
</div>
</nav><header>
<a href="../index.html"><img src="https://openmoji.org/data/color/svg/1F4BF.svg"/></a>
<h1>FS</h1>
</header>
<main>
<article>
<section>
<h3>INTRO</h3>
<p>FS is a <b>filesystem</b> backend implementation for KVS.
Put the {dba,kvs_fs} property for the kvs application in your sys.config.</p>
<br />
<h3>EXAMPLES</h3>
<blockquote>All examples can be executed in Erlang REPL. Only
requirement is to have kvs set in dependencies and kvs application
started.</blockquote>
<p>Create a new kvs_fs table called test. When executed, this
function will create a new directory called test under data
directory in the current workspace.</p>
<figure><code>
kvs_fs:create_table(test, []).
% will return:
% ok
</code></figure>
<p>Put a new key/value in table test. When executed, a new file is
created under test directory. Its name is based on the sha1 of
the key encoded in base64.</p>
<figure><code>
Table = test.
Key = key.
Value = <<"my_value">>.
kvs_fs:put({test, Key, Value}).
% will return:
% ok
</code></figure>
<p>Get a key from value test.</p>
<figure><code>
kvs_fs:get(test, key).
% will return:
% {ok, {test, key, <<"my_value">>}}
</code></figure>
<p>Delete a key</p>
</section>
<section>
<p>This module may refer to:
<a href="kvs.htm"><b>kvs</b></a>.
</p>
</section>
</article>
</main><footer>
2005—2019 © Synrc Research Center
</footer>
<script>function drop(){document.getElementById("dropdown").classList.toggle("show");}</script>
</body></html>