Maven module :un.api : api-encoding :
Class : un.api.path.Path
Extends/Implements : un.api.event.EventSource
Subclasses : -

A Path is similar to a pointer toward some datas.
Similar to linux mount points, a path can be toward a hard disk file,
a distant file service like ftp or html or within archives.
author  Johann Sorel


Variables : INFO_HIDDEN, INFO_OCTETSIZE
Functions : getName, getPathInfo, getParent, getChildren, getChildCount, getChild, isContainer, exists, createContainer, createLeaf, delete, resolve, getResolver, createInputStream, createOutputStream, createSeekableBuffer, toURI, toChars



Path info for hidden property.
public Chars INFO_HIDDEN


Path size in bytes.
public Chars INFO_OCTETSIZE



Get this path segment name.
String getName ()


Path can hold multiple information, like :
Object getPathInfo (Chars key)


Parent Path if any.
return  Path or null
Path getParent ()


Return a copy of the children list.
return  Node[] never null, can be empty
Path[] getChildren ()

int getChildCount ()

Path getChild (int index)


Test if this path is a container in the current resolver.
(only serve as a segment in the tree).

@return true if this path exist and is a container
@throws IOException
boolean isContainer ()


Test if this path target exists.
return  true if this path point toward something that exists
throws  IOException
boolean exists ()


Create the path container if it doesn't exist.
return
throws  IOException
boolean createContainer ()


Create the path leaf if it doesn't exist.
return
throws  IOException
boolean createLeaf ()


Delete this path file or folder.
If it is a folder, is it recursive.
throws  IOException if path could not be deleted
void delete ()


Resolve a relative or absolute address starting at this path address.
param  address
return  Path
Path resolve (String address)


Resolver which created this path.
return  PathResolver
PathResolver getResolver ()


Create an inputstream for this path.
return  ByteInputStream
throws  IOException if stream can not be created
ByteInputStream createInputStream ()


Create an outputstream for this path.
return  ByteOutputStream
throws  IOException if stream can not be created
ByteOutputStream createOutputStream ()


Create a seekable buffer on this path datas.
param  read set to true to request reading support
param  write set to true to request writing support
param  resize set to true to request resizing support
return  SeekableByteBuffer, never null
throws  IOException if buffer creation failed
SeekableByteBuffer createSeekableBuffer (boolean read, boolean write, boolean resize)


get URI representation.
String toURI ()

Chars toChars ()