1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gfs_pio_sendfile</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" title="gfs_pio_sendfile">
<a name="gfs-pio-sendfile.3"></a><div class="titlepage"></div>
<div class="refnamediv">
<a name="name"></a><h2>Name</h2>
<p>gfs_pio_sendfile — receive a Gfarm file to local machine</p>
</div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="synopsis"></a><h2>Synopsis</h2>
<div class="funcsynopsis">
<pre class="funcsynopsisinfo">
#include <gfarm/gfarm.h>
</pre>
<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table">
<tr>
<td><code class="funcdef"><b class="fsfunc">gfarm_error_t gfs_pio_sendfile</b>(</code></td>
<td>
<var class="pdparam">w_gf</var>, </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>
<var class="pdparam">w_off</var>, </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>
<var class="pdparam">r_fd</var>, </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>
<var class="pdparam">r_off</var>, </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>
<var class="pdparam">len</var>, </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>
<var class="pdparam">sentp</var><code>)</code>;</td>
<td> </td>
</tr>
</table>
<div class="paramdef-list">
<code>GFS_File <var class="pdparam">w_gf</var></code>;<br><code>gfarm_off_t <var class="pdparam">w_off</var></code>;<br><code>int <var class="pdparam">r_fd</var></code>;<br><code>gfarm_off_t <var class="pdparam">r_off</var></code>;<br><code>gfarm_off_t <var class="pdparam">len</var></code>;<br><code>gfarm_off_t * <var class="pdparam">sentp</var></code>;</div>
<div class="funcprototype-spacer"> </div>
</div>
</div>
<div class="refsect1" title="DESCRIPTION">
<a name="description"></a><h2>DESCRIPTION</h2>
<p>
Sends
<em class="parameter"><code>len</code></em>
bytes of data from
the position specified by the offset
<em class="parameter"><code>r_off</code></em>
in a local file which is pointed by a file descriptor
<em class="parameter"><code>r_fd</code></em>,
to the position specified by the offset
<em class="parameter"><code>w_off</code></em>
of a Gfarm file
<em class="parameter"><code>w_gf</code></em>.
If len is -1, this function transfers until the end of the file.
The transfered bytes will be stored to the memory pointed by
<em class="parameter"><code>sentp</code></em>
when
<em class="parameter"><code>sentp</code></em>
is not <code class="constant">NULL</code>.
If
<em class="parameter"><code>len</code></em> is a positive value,
and the value pointed by
<em class="parameter"><code>sentp</code></em> is less than
<em class="parameter"><code>len</code></em>,
that means the transfer reached
<acronym class="acronym">EOF</acronym>.
</p>
</div>
<div class="refsect1" title="RETURN VALUES">
<a name="return-values"></a><h2>RETURN VALUES</h2>
<div class="variablelist"><dl>
<dt><span class="term"><code class="constant">GFARM_ERR_NO_ERROR</code></span></dt>
<dd><p>The function terminated successfully.</p></dd>
<dt><span class="term"><code class="constant">GFARM_ERR_OPERATION_NOT_PERMITTED</code></span></dt>
<dd><p><em class="parameter"><code>gf</code></em> does not specify a regular file.</p></dd>
<dt><span class="term"><code class="constant">GFARM_ERR_BAD_FILE_DESCRIPTOR</code></span></dt>
<dd><p>The file descripter specified by <em class="parameter"><code>gf</code></em> is
not a valid or is not open for reading.</p></dd>
<dt><span class="term"><code class="constant">GFARM_ERR_NO_FILE_SYSTEM_NODE</code></span></dt>
<dd><p>There is no available file system node.</p></dd>
<dt><span class="term"><code class="constant">GFARM_ERR_NO_MEMORY</code></span></dt>
<dd><p>Insufficient memory was available.</p></dd>
<dt><span class="term">Others</span></dt>
<dd><p>An error except the above occurred. The reason is shown by
<span class="citerefentry"><span class="refentrytitle">gfarm_error_string</span>(3)</span>.</p></dd>
</dl></div>
</div>
<div class="refsect1" title="SEE ALSO">
<a name="see-also"></a><h2>SEE ALSO</h2>
<p>
<span class="citerefentry"><span class="refentrytitle">gfs_pio_create</span>(3)</span>,
<span class="citerefentry"><span class="refentrytitle">gfs_pio_open</span>(3)</span>,
<span class="citerefentry"><span class="refentrytitle">gfs_pio_write</span>(3)</span>,
<span class="citerefentry"><span class="refentrytitle">gfs_pio_recvfile</span>(3)</span>
</p>
</div>
</div></body>
</html>
|