Closed kirillt closed 2 years ago
Open question: how should we determine if a resource is "plain text"? Ideally, we would like to treat not only files with .txt
extension. Is it a good idea to take first N bytes, attempt conversion of them to UTF-8 and, in case of success, treat the file as plain text?
I think we can use Apache Tika
val fileType = Tika().detect(inputStream)
The app should support previewing plain text files (
.txt
) and editing them in an external app.