java - .getAbsoultePath prints the ProjectPath instead of SystemPath? -
there little problem file.getabsolutepath()
method , tried f.getcanonicalpath();
method.
instead of
c:/documents , settings
it prints
c:\users\me\documents\netbeansprojects\filec\documents , settings
could maybe explain how should changed ?
thank you
f = new file(c://); fs = f.list(); for(string fsv : fs) { f = new file(fsv); string ap = f.getabsolutepath(); system.out.println(ap);
in fs
names of files in c:
, if give file name file object add name current working directory. change code that:
file f = new file("c:/"); file[] fs = f.listfiles(); (file fsv : fs) { string ap = fsv.getabsolutepath(); system.out.println(ap); }
i hope helps.
Comments
Post a Comment