This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript 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: 21048
85
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 ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!