1. Is there a C# equivalent to File.separator in Java stackoverflow.comHow does C# cope with file separators? Is it always assumed the file separator is "\" (or "\\" and does this have to be escaped like this? |
2. File separator vs pathseparator stackoverflow.comOne is called a "name-separator" and the other a "path-separator" right here. What's the difference? When to use which one? |
3. File.separator vs FileSystem.getSeparator() vs System.getProperties("file.separator") stackoverflow.comWhy are there three different ways to get the file-separator in Java? Why would I use one over another? |
4. file separators coderanch.comHello, I am aware of using File.separator to specify system independent paths. But I was wondering, if that is really required. For example I read files in my windows machine using "/" as separator and it works. I use only relative path names. These paths should also work on Unix machines as "/" is the path separator there anyways. So do ... |
5. file.separator coderanch.com |
6. File separator problem forums.oracle.comhi, my application will run on windows, and my file separator should be \ in order for my application to run properly, i need to code as: String file_str = "C:\\My_folder my_file.ppt"; but, the problem is the actual file_str is previously saved to database when i choose the required file from file chooser. so, when i retrieve it from database, it'll ... |
7. Java File Separators forums.oracle.com |
8. File separator problem forums.oracle.comSo what was wrong with just using replaceAll( " $", File.separator ); P.S. I have never found any of this necessary as long as content is to be used to construct a File object because '/' can then be used regardless of the OS. Edited by: sabre150 on May 16, 2009 3:55 PM |
9. get the file separator forums.oracle.comSo your question is how to figure out the separator being used in a file. The easiest way is to arrange for the separator to be written on a line all by itself at the start of the file. If that isn't going to work you have to start thinking about what you know about the data itself. For instance if ... |