Skip to content

File materialization functions #61

@mortenpi

Description

@mortenpi

Conceptually, our datasets don't necessarily have an underlying file object on disk (e.g. the datasets fully stored in TOML files). As such, we only offer access to their contents via an ::IO object. However, sometimes you need to access it a File as a file system file (e.g. #60). We could export two file "materialization" functions:

  • save(::File/FileTree, path::String): takes the File or FileTree object and writes it to path. The purpose of these functions is to allow the extraction of datasets from data repositories.
  • materialize(::File): returns a file path; the purpose is to give (read) access to the dataset as a file system file. For datasets that already have a file somewhere on disk anyway, return that. For datasets that don't (e.g. TOML file, remote datasets), it would automatically create a temporary file (lifetime is the Julia session; would fix Better interoperation with Parquet files #60).

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