greptilian logo

IRC log for #friendlyjava, 2020-04-27

##friendlyjava on freenode

| Channels | #friendlyjava index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
05:13 mr_lou joined ##friendlyjava
09:03 mr_lou If I'm trying to File.renameTo() but there's already another file with the name I want to reanme to, then it obviously won't work. But what if there's a folder with the same name? Will I be unable to rename my file too then?
10:08 Jantz joined ##friendlyjava
10:10 Jantz joined ##friendlyjava
12:51 Jantz joined ##friendlyjava
13:26 Jantz_ joined ##friendlyjava
14:13 pdurbin I guess you're asking if it'll do a move instead.
14:16 aditsu mr_lou: try it and see what happens
16:04 mr_lou aditsu, The thing is, I did try...  and it seems to be the case... just looking for confirmation.
16:06 mr_lou The docs seem to say that it's platform dependent though.
16:06 mr_lou "Many aspects of the behavior of rename is inherently platform-dependent: The rename operation might not be able to move a file from one filesystem to another, it might not be atomic, and it might not succeed if a file with the destination abstract pathname already exists. The return value should always be checked to make sure that the rename operation was successful."
16:06 aditsu it makes sense that you wouldn't be able to rename if the new name already exists
16:07 mr_lou Of course. But having a folder and file with the same name should be possible. Just seems to not be possible using File.
16:07 aditsu actually that should NOT be possible
16:07 aditsu unless you're using some really bizarre filesystem
16:08 mr_lou What?
16:09 mr_lou You're saying you can't have a folder named "aditsu" and a file named "aditsu" in the same folder?
16:09 * mr_lou tries right away
16:09 aditsu none of the file systems I've ever used would let you do that
16:11 mr_lou Wow.... always thought you could do that.
16:11 mr_lou O_o
16:11 mr_lou Actually........ that's what I'm seeing on our shared drive at work.
16:12 mr_lou After starting using WebDAV...  it seems the WebDAV protocol creates a folder with the same name as the file you're using.
16:12 mr_lou It's weird.
16:14 aditsu well, if you had that situation, how would you distinguish between them in a command argument?
16:29 mr_lou Something weird is going on, that's for sure.
16:29 mr_lou Gotta figure out what.
16:31 mr_lou joined ##friendlyjava
16:45 ChanServ joined ##friendlyjava
17:41 ChanServ joined ##friendlyjava
23:58 kirua joined ##friendlyjava

| Channels | #friendlyjava index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

##friendlyjava on freenode