<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1.2//EN"
  "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<!-- $Id$ -->

<refentry id="gfarm-url-section-replicate-from-to.3">

<refentryinfo><date>6 Sep 2005</date></refentryinfo>

<refmeta>
<refentrytitle>gfarm_url_section_replicate_from_to</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>Gfarm</refmiscinfo>
</refmeta>

<refnamediv id="name">
<refname>gfarm_url_section_replicate_from_to</refname>
<refpurpose>Create a file replica of a file section</refpurpose>
</refnamediv>
<refsynopsisdiv id="synopsis">
<funcsynopsis>
<funcsynopsisinfo format="linespecific">
#include &lt;gfarm/gfarm.h&gt;
</funcsynopsisinfo>

<funcprototype>
  <funcdef><function moreinfo="none"><returnvalue>char *</returnvalue>gfarm_url_section_replicate_from_to</function></funcdef>
    <paramdef>const char *<parameter moreinfo="none">gfarm_url</parameter></paramdef>
    <paramdef>char *<parameter moreinfo="none">section</parameter></paramdef>
    <paramdef>char *<parameter moreinfo="none">srchost</parameter></paramdef>
    <paramdef>char *<parameter moreinfo="none">dsthost</parameter></paramdef>
</funcprototype>

</funcsynopsis>
</refsynopsisdiv>

<!-- body begins here -->

<refsect1 id="description"><title>DESCRIPTION</title>

<para> <function moreinfo="none">gfarm_url_section_replicate_from_to()</function>
creates a file replica of a file section
<parameter moreinfo="none">section</parameter> of a file
<parameter moreinfo="none">gfarm_url</parameter> from a source host
<parameter moreinfo="none">srchost</parameter> to a destination host
<parameter moreinfo="none">dsthost</parameter>.  </para>

<para> File section is an architecture name for executable files, or
is a fragment index for a regular file.  Note that a fragment index
needs to be specified in string without any unnecessary space
character and zero padding.  </para>

<para> When there is no file copy on a host specified by
<parameter moreinfo="none">srchost</parameter>,
<function moreinfo="none">gfarm_url_section_replicate_from_to()</function> returns
error.  </para>

</refsect1>

<refsect1 id="return-values"><title>RETURN VALUES</title>
<variablelist>
<varlistentry>
<term><constant>NULL</constant></term>
<listitem>
<para>The function terminated successfully.</para>
</listitem>
</varlistentry>

<varlistentry>
<term><constant>GFARM_ERR_NO_MEMORY</constant></term>
<listitem>
<para>Insufficient memory was available.</para>
</listitem>
</varlistentry>

<varlistentry>
<term><constant>GFARM_ERR_NO_SUCH_OBJECT</constant></term>
<listitem>
<para>A component used as a directory in
<parameter moreinfo="none">gfarm_url</parameter> does not exist, or a file copy does
not exist on the specified source host.</para>
</listitem>
</varlistentry>

<varlistentry>
<term><constant>GFARM_ERR_TEXT_FILE_BUSY</constant></term>
<listitem>
<para>The file <parameter moreinfo="none">gfarm_url</parameter> cannot be replicated
because it is being updated by another process.</para>
</listitem>
</varlistentry>

<varlistentry>
<term>Others</term>
<listitem>
<para>An error except the above occurred.  The reason is shown by its
pointed strings.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>

<refsect1 id="see-also"><title>SEE ALSO</title>
<para>
<citerefentry><refentrytitle>gfarm_url_section_replicate_to</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>gfarm_url_fragments_replicate</refentrytitle><manvolnum>3</manvolnum></citerefentry>
</para>
</refsect1>
</refentry>

