All Downloads are FREE. Search and download functionalities are using the official Maven repository.

chapi.app.analyser.support.AbstractFile.kt Maven / Gradle / Ivy

Go to download

Chapi is A common language meta information convertor, convert different languages to same meta-data model

There is a newer version: 1.5.10
Show newest version
package chapi.app.analyser.support

import java.io.File

open class AbstractFile(
    var fileName: String,
    var absolutePath: String,
    var isFile: Boolean,
    var relativePath: String,
    var content: String
) {
    companion object {
        fun toAbstractFile(file: File, workspace: File): AbstractFile {
            return AbstractFile(
                fileName = file.name,
                absolutePath = file.absolutePath,
                relativePath = file.relativeTo(workspace).toString(),
                isFile = file.isFile,
                content = ""
            )
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy