Skip to content

Add obvious file extensions in to_..._file methods #649

@lars-reimann

Description

@lars-reimann

Is your feature request related to a problem?

When calling e.g. Table.to_csv_file an error is raised, if the given path does not have the file extension .csv.

Some other functions like Image.to_png_file don't check the file extension and just create a file with the given path.

Desired solution

  1. Behavior should be consistent.
  2. For ease of use, we could check whether the path already has the correct file extension:
    • If it does, we use it as is.
    • If it has no extension, we add the obvious one.
    • if it has a wrong extension, we raise an error.

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

✔️ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions