Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Filesystem type  RSS feed

 
Bobes Calin
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello! Is there possible to view the filesystem type of a partition in java? for example i if a give the path of the drive C:\ to return the ntfs.

Cheers!
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not without JNI. The system calls for doing this are different on most operating systems. On Unix and Linux, all you need to do is get the "mount" information. For Windows, there is at least one system call (can't remember which one though).
 
Bobes Calin
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the reply but i am so confused... i don`t understand...is there aything more simple?

Cheers!
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java is intented to be platform independent.
You want something platform specific.
You need platform specific tools for that.
Windows has DLL libraries written in C++.
You can use JNI (Java Native Interface) to access them.
More about JNI: http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jni.html
You only need to find out which DLL library to use for filesystem info.
You can ask that at a Microsoft forum.
[ December 21, 2008: Message edited by: Bauke Scholtz ]
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!