---
name: "gfarm_url_fragments_replicate"
section: "3"
platform: "linux"
package: "libgfarm-dev"
version: "2.4.1-1.1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/gfarm_url_fragments_replicate"
---

# gfarm\_url\_fragments\_replicate(3)

Create a file replica of a file

## NAME

gfarm\_url\_fragments\_replicate - Create a file replica of a file

## SYNOPSIS

**#include \<gfarm/gfarm.h\>**

**char \*gfarm\_url\_fragments\_replicate (const char \****gfarm\_url***, int** *ndsthosts***, char \*\****dsthosts***);**

## DESCRIPTION

**gfarm\_url\_fragments\_replicate()** creates a file replica of a file *gfarm\_url* to destination hosts specified by a string array *dsthosts* with a length *ndsthosts*.  It cannot replicate an executable file.

When the total number of file fragments is greater than the specified total number of hosts *ndsthosts*, destination hosts are allocated in round robin.

## RETURN VALUES

- **NULL**

  The function terminated successfully.

- **GFARM\_ERR\_NO\_MEMORY**

  Insufficient memory was available.

- **GFARM\_ERR\_OPERATION\_NOT\_PERMITTED**

  The file is not a regular fragmented file.

- **Others**

  An error except the above occurred.  The reason is shown by its pointed strings.

## SEE ALSO

[**gfarm\_url\_section\_replicate\_from\_to**(3)](/gfarm_url_section_replicate_from_to/3.md), [**gfarm\_url\_section\_replicate\_from\_to**(3)](/gfarm_url_section_replicate_from_to/3.md)
