omnipath_cache_move_in {OmnipathR} | R Documentation

## Moves an existing file into the cache

### Description

Either the key or the URL (with POST and payload) must be provided.

### Usage

    omnipath_cache_move_in(
      path,
      key = NULL,
      version = NULL,
      url = NULL,
      post = NULL,
      payload = NULL,
      keep_original = FALSE
    )

### Arguments

`path` | Path to the source file
`key` | Key of the cache item
`version` | Version of the cache item. If does not exist a new version item will be created
`url` | URL of the downloaded resource
`post` | HTTP POST parameters as a list
`payload` | HTTP data payload
`keep_original` | Whether to keep or remove the original file

### Value

Character: invisibly returns the version number of the cache version item.

### See Also

`omnipath_cache_save`

### Examples

    omnipath_cache_move_in('some/file.zip', url = 'the_download_address')

    # basic example of moving a file to the cache:

    bioc_url <- 'https://bioconductor.org/'
    html_file <- tempfile(fileext = '.html')
    httr::GET(bioc_url, httr::write_disk(html_file, overwrite = TRUE))
    omnipath_cache_move_in(path = html_file, url = bioc_url)
    omnipath_cache_remove(url = bioc_url) # cleaning up

[Package OmnipathR version 3.0.0 Index]