unix « directory « Java I/O Q&A





1. Copy a directory while preserving symlinks using Java File/IO APIs    stackoverflow.com

Is it possible to copy directory contents using the Java I/O and File-related APIs while preserving existing symlinks? I am working on a tool that needs to perform "directory copy" operations ...

2. Case insensitive directory access in Java on Unix    stackoverflow.com

I am working on Unix, which uses case sensitive filenames and need a way to access them in a case-insensitive manner. Specifically, at time the program needs to get into a /images ...

3. Writing to a directory in a Unix environment    coderanch.com

Hi, I'm using FileWriter to write to a folder in a Unix environment but when I deploy and run I receive an error saying no such file or directory. The same code works in the window environment I tested in. is there some special format I need to be using? The directory I'm trying to write to is on the root ...

4. Compiling all modified Java files in a folder on Unix    java-forums.org

Hi all, I have a Unix script that will compile all Java files in a sub folder as follows: find . -name "*.java" -print -exec $JAVA_HOME/bin/javac -cp .:$CLASSPATH '{}' \; I would like to enhance it to only compile those Java files who: 1.) Have no class file 2.) Have a class file modified in the past. Could someone please assist ...

5. How to get doubleslash for file path in unix    forums.oracle.com

Um, it would just be "//" but why do you think you need it? You may be confused with needing " " in order to get a single '\' character into a string literal. That has nothing to do with file paths and everything to do with the escape character in Java string literals. '\' is special in Java strings. '/' ...

6. f.delete() doesn't delete directories on unix machines sometimes.    forums.oracle.com

A small directory on unix machine is used to hold temp files. It also has a directory structure. (.../temp/123221124.1/file1, .../temp/12423225.3/file2, etc). So, when cleanup utility (java function) is called it deletes all the files inside each of the directories under temp without any problems, but it leaves some of these directories there. Basically, the steps are : java function iterates through ...

7. Unix home directory question using Java    forums.oracle.com

Hi, I have been scratching my head on this for a few days now and can't come up with a solution, so I am seeking help. I have a GUI app, and I want to be able to write to a file in my home dir. If i hard code this in the application, of course it works, meaning I say ...