3.4. lfc-pull: Retrieve and checkout one or more large files

This function retrieves (either through remote or local copy) files, puts them in the local cache, and then checks out a copy to the WORKING repo. This command cannot be called from a bare repo.

The first step is to find all .lfc files matching the users input. Users can specify which files to get by providing a list of file name patterns. If the user does not specify any patterns, all files in the current working directory or child directories (recursive) are pulled.

Then for each .lfc file that meets these constraints, it downloads the file into the working repo’s .lfc/cache/ folder and then copies the local cache file to the working repo.

Usage:
$ lfc pull [PAT1 [PAT2 ...]] [OPTIONS]
Inputs:
  • PAT1: First pattern for files to list

  • PAT2: Second pattern for files to list

Options:
-h, --help

Display this help message and exit

-r, --remote REMOTE

Use remote cache named REMOTE (w/o -r flag, use default remote)

--mode MODE

Only pull files of mode MODE: 1 | 2 | {both}

-1

Shortcut for --mode 1

-2

Shortcut for --mode 2

-f, --force

Overwrite uncached working files if they exist

-q, --quiet

Reduce STDOUT during download (no messages for up-to-date files)

Examples:

This will download and checkout the file myfile.dat if the file myfile.dat.lfc exists:

$ lfc pull myfile.dat

Note that

$ lfc pull myfile.dat.lfc

is equivalent. Suppose the hash for this file is 'a4b3f7'. Then it will look for the file a4/b3f7 on the remote cache, copy it to the local cache, and then copy that file to myfile.dat in the current working directory.

This will download and check out all files starting with a or b for which an .lfc file exists:

$ lfc pull "a*.lfc" "b*.lfc"

Suppose the current folder has these files:

a1.dat a1.dat.lfc a2.dat a3.dat.lfc

Then the above command would act on the files a1.dat and a3.dat. a2.dat is not processed because there is no large file metadata file.