开发者

Use java to read metadata/properties of text files (.txt)

I have created a a java class that is used to get/set document's metadata (like author, subject etc).

I use pdfBox Library for pdf files and apache poi library for ms office documents and they 're doing the job perfectly.

My problem is that i also want to access .txt file properties, but can't find out how to do it. I've used lots of things i've read, but none seems to be working. For txt files i just need to be able to get Creation Da开发者_开发百科te and Modification Date (if possible, i would also like to be able to set Modification Date)

Any ideas?


Text files have no metadata other than that present for all files, which is accessible via java.io.File. However, that only gives you access (read and write) to the modification date, probably because not all filesystems have a separate creation date.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜