info {s3fs}R Documentation

Get files and directories information

Description

s3_file_info returns file information within AWS S3 directory

s3_file_size returns file size in bytes

s3_dir_info returns file name information within AWS S3 directory

s3_dir_ls returns file name within AWS S3 directory

Usage

s3_file_info(path)

s3_file_size(path)

s3_dir_info(
  path = ".",
  type = c("any", "bucket", "directory", "file"),
  glob = NULL,
  regexp = NULL,
  invert = FALSE,
  recurse = FALSE,
  refresh = FALSE,
  ...
)

s3_dir_ls(
  path = ".",
  type = c("any", "bucket", "directory", "file"),
  glob = NULL,
  regexp = NULL,
  invert = FALSE,
  recurse = FALSE,
  refresh = FALSE,
  ...
)

Arguments

path

(character):A character vector of one or more paths. Can be path or s3 uri.

type

(character): File type(s) to return. Default ("any") returns all AWS S3 object types.

glob

(character): A wildcard pattern (e.g. *.csv), passed onto grep() to filter paths.

regexp

(character): A regular expression (e.g. [.]csv$), passed onto grep() to filter paths.

invert

(logical): If code return files which do not match.

recurse

(logical): Returns all AWS S3 objects in lower sub directories

refresh

(logical): Refresh cached in s3_cache.

...

parameters to be passed to s3_list_objects_v2

Value

s3_file_info A data.table with metadata for each file. Columns returned are as follows.

s3_dir_info data.table with directory metadata

s3_dir_ls character vector of s3 uri paths

Examples

## Not run: 
# Require AWS S3 credentials

temp_file = s3_file_temp(tmp_dir= "MyBucket")
s3_file_create(temp_file)

s3_file_info(temp_file)

## End(Not run)

[Package s3fs version 0.1.5 Index]