S
Scott Steiner
hi,
this problem has kept me busy for several days now. i'm implementing a
board game that logs the moves as they are done in a file. at the end of
the match the file is renamed by giving it a timestamp in it's name.
however, the renaming is not succeeding. actually i rename 2 files at
the end of the match, the first file is renamed but the second isn't.
what reasons can fundamentally cause this behaviour? the file is
definitely closed before attempting to rename it and no ther file exists
with the same name so there is no naming conflict after a rename. i'm
creating a file instance with new File(...) and then using the
renameTo() method. is there a way to get an error return code of the
renameTo() method which gives an explanation what exactly went wrong? at
the moment i only receive either true or false.
thx for any input!
this problem has kept me busy for several days now. i'm implementing a
board game that logs the moves as they are done in a file. at the end of
the match the file is renamed by giving it a timestamp in it's name.
however, the renaming is not succeeding. actually i rename 2 files at
the end of the match, the first file is renamed but the second isn't.
what reasons can fundamentally cause this behaviour? the file is
definitely closed before attempting to rename it and no ther file exists
with the same name so there is no naming conflict after a rename. i'm
creating a file instance with new File(...) and then using the
renameTo() method. is there a way to get an error return code of the
renameTo() method which gives an explanation what exactly went wrong? at
the moment i only receive either true or false.
thx for any input!