M
mishi_math
I should preface this by saying that I am using the following code.
*******************************************************************
if ( true == tempFile.canWrite() ) {
String daf = monitorDir+"\\"+theList[x];
File dirAndFname = new File(daf);
boolean didItUpload = ftu.uploadToServer( monitorDir, theList[x]);
if ( true == didItUpload ) {
System.out.println( "It worked");
System.out.println( "Rename file, did it work?
"+tempFile.renameTo(renameFile));
}
else {
System.out.println("It failed");
}
}
*******************************************************************
What I have a problem with is that I was editing on of the files in
the directory that I was monitoring files and the canWrite() method
said that the file was able to be written to, even though I was in
edit mode and hadn't saved it.
Is there a way to check that is more comprehensive? This may be a moot
point, but I am not sure on how this file that will be placed in the
directory will be placed there. Unknown because it is a piece of
hardware writing the file out, have sent a question to the builder of
it, but no answer yet.
Oh...and as a note, if I make the files read only all is good too.
Thanks for any assistance.
Mishi
*******************************************************************
if ( true == tempFile.canWrite() ) {
String daf = monitorDir+"\\"+theList[x];
File dirAndFname = new File(daf);
boolean didItUpload = ftu.uploadToServer( monitorDir, theList[x]);
if ( true == didItUpload ) {
System.out.println( "It worked");
System.out.println( "Rename file, did it work?
"+tempFile.renameTo(renameFile));
}
else {
System.out.println("It failed");
}
}
*******************************************************************
What I have a problem with is that I was editing on of the files in
the directory that I was monitoring files and the canWrite() method
said that the file was able to be written to, even though I was in
edit mode and hadn't saved it.
Is there a way to check that is more comprehensive? This may be a moot
point, but I am not sure on how this file that will be placed in the
directory will be placed there. Unknown because it is a piece of
hardware writing the file out, have sent a question to the builder of
it, but no answer yet.
Oh...and as a note, if I make the files read only all is good too.
Thanks for any assistance.
Mishi