9
<holder>Ericsson AB, All Rights Reserved</holder>
7
<year>2003</year><year>2009</year>
8
<holder>Ericsson AB. All Rights Reserved.</holder>
12
The contents of this file are subject to the Erlang Public License,
13
Version 1.1, (the "License"); you may not use this file except in
14
compliance with the License. You should have received a copy of the
15
Erlang Public License along with this software. If not, it can be
16
retrieved online at http://www.erlang.org/.
18
Software distributed under the License is distributed on an "AS IS"
19
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
20
the License for the specific language governing rights and limitations
23
The Initial Developer of the Original Code is Ericsson AB.
11
The contents of this file are subject to the Erlang Public License,
12
Version 1.1, (the "License"); you may not use this file except in
13
compliance with the License. You should have received a copy of the
14
Erlang Public License along with this software. If not, it can be
15
retrieved online at http://www.erlang.org/.
17
Software distributed under the License is distributed on an "AS IS"
18
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
19
the License for the specific language governing rights and limitations
26
24
<title>erl_tar</title>
333
331
<name>open(Name, OpenModeList) -> RetValue</name>
334
<fsummary>Open a tar file.</fsummary>
332
<fsummary>Open a tar file for writing.</fsummary>
336
334
<v>Name = filename()</v>
337
335
<v>OpenModeList = [OpenMode]</v>
338
<v>Mode = read|write|compressed|cooked</v>
339
<v>RetValue = {ok,TarDescriptor}|{error,{Name,Reason}} <V>TarDescriptor = term()</v>
336
<v>Mode = write|compressed|cooked</v>
337
<v>RetValue = {ok,TarDescriptor}|{error,{Name,Reason}}</v>
338
<v>TarDescriptor = term()</v>
340
339
<v>Reason = term()</v>
343
342
<p>The <marker id="open"></marker>
344
<c>open/2</c> function opens a tar file.</p>
343
<c>open/2</c> function creates a tar file for writing.
344
(Any existing file with the same name will be truncated.)</p>
345
345
<p>By convention, the name of a tar file should end in "<c>.tar</c>".
346
346
To abide to the convention, you'll need to add "<c>.tar</c>" yourself
348
<p>Note that there is currently no function for reading
349
from an opened tar file, meaning that opening a tar file for reading is
351
<p>Except for <c>read</c> and <c>write</c> (which are mutually
352
exclusive), the following atoms may be added to <c>OpenModeList</c>:
348
<p>Except for the <c>write</c> atom the following atoms
349
may be added to <c>OpenModeList</c>:</p>
355
351
<tag><c>compressed</c></tag>