Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to fetch file attributes such as creation time,size,owneretc  RSS feed

 
karnakar ganji
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
i am unable to fetch any files creation time,owner of the file,size,type of the file etc
is there any particular class so that i can directly use that class methods.
please suggest some ideas so that i will get brief idea..

Thanks in advance.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's what the java.io.File class does. It's limited, though (doesn't have everything you mention).

There's a library called JConfig that uses JNI to provide more information; you can download it here.
 
karnakar ganji
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
can you please tell how to use JNI..please please
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you asking about JConfig specifically, or about JNI in general? If the former, then the library comes with extensive installation instructions, and the code you'd write that uses it wouldn't use JNI anyway.

If the latter, please start a new topic in the Other Java APIs forum.
 
karnakar ganji
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
actually i am confused, how to proceed for developing this type application...i never used JNI....
is there any other way to get the file attributes...
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I said, you don't need to write JNI code; the library does that. Why don't you take a look at it in order to determine whether it even fits your requirements, and to see how easy or hard it is to work with?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!