Re: what is canonical path?
From: Ben Wan (bwan0425_at_rogers.com)
Date: 10/06/03
- Next message: Phil...: "Re: what is canonical path?"
- Previous message: Phil...: "Re: what is canonical path?"
- In reply to: Phil...: "Re: what is canonical path?"
- Next in thread: Phil...: "Re: what is canonical path?"
- Reply: Phil...: "Re: what is canonical path?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 06 Oct 2003 06:06:06 GMT
oh.. i use Win2k with 1.4.1 at home and at school I use win xp with java 1.4.1, so you think is only the platform's problem? well, I
guess that's life for me... :-(
"Phil..." <rynes@ieee.org> ¦b¶l¥ó news:PZ6gb.503892$Oz4.357379@rwcrnsc54 ¤¤¼¶¼g...
> On my machine it works like John says it should.
> I have WIN XP Pro and java 1.4.2
> What do you have for OS and Java?
>
> "Ben Wan" <bwan0425@rogers.com> wrote in message
> news:6A6gb.36143$ko%.32339@news04.bloor.is.net.cable.rogers.com...
> > "John Kordyback" wrote:
> > > getAbsolutePath returns the complete path to the file starting at the
> > > filesystem root.
> >
> > if it returns a complete path then how come the following doesn't return
> the "absolute path"?
> > File f = new File(".");
> > f.getAbsolutePath(); // return "." and not "c:\folder\folder" ?
> > Thx.. ^_^
> >
> > > getCanonicalPath returns the full path without aliases, shortcuts,
> > > shadows or symbolic links. getCanonicalPath resolves those aliases to
> > > their actual directories.
> > >
> > > getCanonicalPath throws an IOExceptions when the full path is not
> > > available (e.g. the disk in drive A is not ready or the user does not
> > > have access to the directory). It helps you catch errors before you
> > > write into the stream.
> > >
> > > /qb
> > >
> > >
> > > Ben Wan wrote:
> > > > Can anyone please tell me what is canonical path? and why does it need
> to throws IOexception?
> > > > how come getAbsolutePath() doesn't return "c:\folder\folder" but
> getCanonicalPath() does?
> > > > things I tried using java.io.File
> > > > file.getName(); // return "."
> > > > file.getAbsolutePath(); // return "."
> > > > file.getCanonicalPath(); // return "c:\folder\folder"
> > > >
> > > >
> > > > Thank You Very Much!
> > > >
> > > > Ben
> > > >
> > > >
> > >
> >
> >
>
>
- Next message: Phil...: "Re: what is canonical path?"
- Previous message: Phil...: "Re: what is canonical path?"
- In reply to: Phil...: "Re: what is canonical path?"
- Next in thread: Phil...: "Re: what is canonical path?"
- Reply: Phil...: "Re: what is canonical path?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|