That should be correct. I wrote mine the way I did so I know which node is
the first node it *doesn't* have, since I don't believe there is a way to
create 'nested' nodes (say dir2 as missing, you couldn't call
root.addNode('dir1/dir2')) at least I dont think you can! :)
On Wed, Jul 23, 2008 at 3:29 PM, Michael Harris <[EMAIL PROTECTED]>
wrote:
> So if I have
>
> path = "dir1/dir2";
> rootNode.hasPath(dir);
>
> the method returns true if and only if off root there exists a node named
> dir1, and off dir1 there exists a node named dir2.
>
>
> On Wed, Jul 23, 2008 at 3:25 PM, Michael Harris <
> [EMAIL PROTECTED]>
> wrote:
>
> > Ah, missed that.
> >
> > thanx.
> >
> >
> > On Wed, Jul 23, 2008 at 3:21 PM, Alexander Klimetschek <[EMAIL PROTECTED]
> >
> > wrote:
> >
> >> On Wed, Jul 23, 2008 at 9:14 PM, Michael Harris
> >> <[EMAIL PROTECTED]> wrote:
> >> > Can someone confirm or deny the following: That when a programmer
> users
> >> >
> >> > getNode(somePath);
> >> >
> >> > that path has to exist or an exception is thrown. If I want
> >> functionality
> >> > that gets or creates if the path doesn't exist I have to implement it
> >> > myself?
> >>
> >> Yes. You can use Session.getRootNode().hasNode(somePath) to check for
> >> the existence of a node.
> >>
> >> Regards,
> >> Alex
> >>
> >> --
> >> Alexander Klimetschek
> >> [EMAIL PROTECTED]
> >>
> >
> >
> >
> > --
> > ---------------------
> > Michael Harris
> >
>
>
>
> --
> ---------------------
> Michael Harris
>