chapi.app.analyser.support.AbstractFile.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chapi-application Show documentation
Show all versions of chapi-application Show documentation
Chapi is A common language meta information convertor, convert different languages to same meta-data model
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 = ""
)
}
}
}