Java File类rename时的错误

Wayne posted @ Tue, 11 May 2010 01:15:29 +0000 in Experience , 6675 readers



File oldf=new File(oldpath);
File newf=new File(newpath);






但是,运行之后,发现全部都是修改失败。 上网找了下原因,有人列出renameTo失败的三种情况:





这个折腾了我很久。直到有一天我想手动改名实验下的时候,发现症结所在了。我的newpath,也就是要改的名字,里面带了“*”号!! 我原本是想用这个作为分隔符的,没想到这个恰好是windows禁用的符号……早知道如此,我直接用“#”号不就完了!!

кредит онлайн said:
Sat, 07 Aug 2021 06:43:31 +0000

These are the poses of the rozrahovani only for live consumers. Oscillations are mute to consume their income, microcredits are seen by all citizens of the community, including students and pensioners. It is necessary to consider the possibility of rejection of positions from the credit history. Private banks are available to some clients, at that time, as many MFOs are ready to view the position for the increase of the listings.

The simplicity of eliminating microposes allows you to use the system in the capacity of a potent financial reserve. You can take a singing bag with a minimum amount of money, but the term may only take 30 days.

Login *

loading captcha image...
(type the code from the image)
or Ctrl+Enter