File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
I/O and Streams
case sensitiveness on samba share
Joined: Dec 11, 2008
Nov 19, 2009 03:02:48
does anyone know how to solve this case sensitive/insensitive filename problem?
I only known a case insensitive filename for example "myfile.txt". Actually the file is stored as "MYFILE.txt".
On windows I can open it regardless of how it is actually stored and with the getCanocialPath method I get the real filename.
File file = new File("/myfile.txt"); System.out.println( file.getCanonicalPath()); // output: "/MYFILE.txt"
Trying this on Linux with an Samba share, does also open the file, but I don't get the real filename.
File file = new File("/myfile.txt"); System.out.println( file.getCanonicalPath()); // output: "/myfile.txt"
The linux console does show the filename "MYFILE.txt" so I don't think it's a samba problem. Is there a way to get the real filename?
Joined: Oct 29, 2001
Nov 19, 2009 05:52:42
*nix operating systems including Linux are case-sensitive. That is, the file names "myfile.txt" and "MYFILE.txt" would refer to two different files.
How To Ask Questions On JavaRanch
subject: case sensitiveness on samba share
Problem with Exceptions
Linux Windows co-exist : How to
Hi...how to print to a file...
Task to parse a remote log file
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015