Skip to content

Replace io.File on nio.Path in DataFrame.read methods #527

Open
@zaleslaw

Description

@zaleslaw

Now we are using File class from java.io in our API for reading DataFrames instead of Path from java.nio

For example

public interface SupportedDataFrameFormat : SupportedFormat {
    public fun readDataFrame(stream: InputStream, header: List<String> = emptyList()): DataFrame<*>

    public fun readDataFrame(file: File, header: List<String> = emptyList()): DataFrame<*>
}

Both of the classes are adopted in Kotlin with some of the extension functions, but usage of Path is more modern and highly-recommended for library creators.

I suggest replacing Path to File or temporarily add new method with Path for 1-2 releases to be aligned with modern recommendation

I want to add two additional links
https://discuss.kotlinlang.org/t/file-vs-path-in-kotlin/26349
https://www.baeldung.com/java-path-vs-file

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions