walk: walk

walkR Documentation

walk

Description

Traverse the hierarchy of files and folders stored under the synId. Has the same behavior as os.walk()

Usage

walk(synId)

Arguments

synId

A synapse ID of a folder or project

includeTypes

Must be a list of entity types (ie.c("file", "table") The "folder" type is always included so the hierarchy can be traversed. Defaults to c("folder", "file", "table", "link", "entityview", "dockerrepo", "submissionview", "dataset", "materializedview")

Examples

  ## Not run: 
    # default entity types
    walkedPath <- walk("syn1234")
    walkedPath$asList()
    # or 
    as.list(walkedPath)
    
    # Exclude tables and views
    walkedPath <- walk(synId="syn1234", includeTypes=c("file"))
    walkedPath$asList()
    # or 
    as.list(walkedPath)
    
    # Exclude files
    walkedPath <- walk(synId="syn1234", includeTypes=c("table"))
    walkedPath$asList()
    # or 
    as.list(walkedPath)
  
## End(Not run)

Sage-Bionetworks/synapserutils documentation built on Aug. 31, 2024, 10:42 a.m.