Skip to content

Problems with Directories #251

Closed
Closed
@karl616

Description

@karl616

I've been trying to use Directories when that is suitable. I have a couple of issues:

Given that I define a Directory in my input file as:

dir:
  class: Directory
  location: /tmp
  1. If the specified folder contains a lot of files and subfolders, cwltool (ver. 1.0.20161207161158) will spend quite some time generating "listing". Perhaps this should be done lazily?
  2. cwltool crashes if you don't have permissions to access all subfolders.
  3. referring to the Directory within an expression, input.dir.location == "file:///tmp" and input.dir.path does not exist. (Test code below). I would have expected that something should evaluate to /tmp? Am I missing something?

The behavior is the same if I initialize with path: /tmp instead of location. This perplexes me a bit. I don't understand why path is unset.

cwlVersion: v1.0
class: ExpressionTool

requirements:
- class: InlineJavascriptRequirement

inputs:
  dir:
    type: Directory

outputs:
  location:
    type: string
  path:
    type: string

expression: |
  ${
    return {"location":inputs.dir.location, "path": ("" + inputs.dir.path)};
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions