select file OR directory?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

select file OR directory?

Kenneth Sloan-2
JAVA plugin - I would like to prompt the user for *either* a file or a directory.

If a file, I would then open it.

If a directory, I would then treat the image files in that directory as a stack.

I can see how to do either one - but I  can't see how to select a file and then check to see if is a directory.

OpenDialog - will allow the user to specify a single file - but not a directory

DirectoryChooser - will allow the user to specify a directory - but not a single file

What am I missing?

My current workaround is to always ask for a directory, and ask the user to put single image "stacks" in a directory containing only one file.  Can I do better?


--
Kenneth Sloan
[hidden email]
Vision is the art of seeing what is invisible to others.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html