Description Usage Arguments Value Examples
The function uses the command-line program 'GCSDokan' on Windows or 'gcsfuse' on Linux system to mount a google cloud bucket path to your local file system.
1 2 3 4 5 6 7 8 9 10 11 12 |
remote |
the remote path to a Google Cloud Storage bucket. It can be either the bucket itself or a directory in the bucket. |
mountpoint |
The mount point where the GCS file system will be mounted to. |
mode |
the permission of the mounted directory. The write permission is only available on Linux. |
cache_type |
The location where the file cache will be stored. The cache type 'none' and 'memory' are only available on Windows |
cache_arg |
The argument of a cache type. If 'cache_type = "memory"', the argument is the limit of the memory useage in MB. If 'cache_type = "disk"', the argument is the path to a cache directory. |
billing |
The billing project ID. |
refresh |
The refresh rate of the cloud files. |
implicit_dirs |
Implicitly define directories based on content. This argument is only available on Linux. |
key_file |
The service account credentials file |
additional_args |
The additional argument that will be passed to the command-line program. |
no return value
1 2 3 4 5 6 7 8 | bucket <- "genomics-public-data"
mountpoint <- paste0(tempdir(),"/GCSFilesystemTest")
## You must have a credentials on Linux and macOs
## To run this code
if(Sys.getenv("GOOGLE_APPLICATION_CREDENTIALS")!=""){
gcs_mount(bucket, mountpoint)
gcs_unmount(mountpoint)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.