### IPathName

  IPathName represents full or partial paths to file system entities.

  This class allows clients to specify file system entities via path names. Constructing an IPathName object, as in:

  IPathName aPathName("/home/widget/work/Foo.C", IUnixPathNameParser());

  allows the client to get an IFileSystemEntity representing the file Foo.C via a call such as:

  IFile anEntity(aPathName);

  You may provide a "parser" for the host-specific paths that you pass in, or you may use the default parser for the system on which your program is running. A parser that works for the system on which your program is running is available from IPathName::defaultParser().

### IPathName - Member Functions and Data by Group

### Constructors & Destructor

~IPathName
  Destructor.

      public:
      virtual ~IPathName()

  Delete the object.

  None.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

IPathName
  Construct a new IPathName object.

  Overload 1
  Copy constructor.

      public:
      IPathName(const IPathName& copyMe)

  This function constructs a copy of the given object.

  copyMe
    The object to copy.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2
  Empty constructor.

      public:
      IPathName()

  None.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 3
  Constructor.

      public:
      IPathName( const IHostPathName& path,
                 const ICompoundNameParser& aParser = defaultParser ( ) )

  This function uses the specified parser to construct a path name from the text. If no parser is specified, this system's default file name parser is used.

  path
    The text representation of the path.

    aParser The parser used to convert the text into path name components. If none is specified, the default filename parser is used.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 4
  Constructor.

      public:
      IPathName( const IDirectory& startHere,
                 const IHostPathName& partialPath,
                 const ICompoundNameParser& aParser = defaultParser ( ) )

  This function constructs an IPathName by appending a relative path to a directory's path. It uses the specified parser to construct a path name from the text. If no parser is specified, this system's default file name parser is used.

  startHere
    The directory whose path is used as the start of the constructed path.

    partialPath The text representation of the partial path that is appended to the directory's path.

    aParser The parser used to convert the text into path name components. If none is specified, the default filename parser is used.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 5
  Constructor.

      public:
      IPathName(const ICompoundName& downcast)

  This function downcasts the given object and then constructs a copy of it.

  downcast
    The object to copy.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 6
  Constructor.

      public:
      IPathName( const IDirectory& startHere,
                 const IPathName& partialPath )

  This function constructs an IPathName by appending a relative path to a directory's path.

  startHere
    The directory whose path is used as the start of the constructed path.

    partialPath The text representation of the partial path that is appended to the directory's path.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

operator =
  Assignment operator.

      public:
      IPathName& operator =(const IPathName& copyMe)

  Copy the given object to another IPathName object.

  copyMe
    The object to copy.

Return
  operator= returns an IPathName object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Static member functions

defaultParser
  Get default path name parser.

      public:
      static const ICompoundNameParser& defaultParser()

  Get the default path name parser for this operating system.

  If you have a user-supplied path, a command line argument, etc., this is the parser that you should use to parse it.

  None.

Return
  defaultParser returns a const ICompoundNameParser object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Streaming

readFromStream
  Stream in.

      protected:
      virtual void readFromStream(IDataStream& fromwhere)

  Read the object from the given data stream.

  fromwhere
    From where to stream the data.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

writeToStream
  Stream out.

      protected:
      virtual void writeToStream(IDataStream& towhere) const

  Write the object to the given data stream.

  towhere
    Where to stream the data.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### IPathName - Inherited Member Functions and Data

#### Inherited Public Functions

  ICompoundName

  -     virtual ~ICompoundName()

  -     virtual void append(const ICompoundName& relativePath)

  -     virtual void appendComponent(const IText& componentPath)

  -     virtual IText componentAt(unsigned long index) const

  -     virtual void
          factorCommonRoot( const ICompoundName& anotherPath,
                            ICompoundName& commonRoot,
                            ICompoundName& rootToLeaf ) const

  -     virtual long hash() const

  -     ICompoundName( const IText& path,
                       const ICompoundNameParser& parser )

  -     ICompoundName()

  -     ICompoundName(const ICompoundName& copyMe)

  -     virtual bool isFullPath() const

  -     virtual IText lastComponent() const

  -     virtual unsigned long numberOfComponents() const

  -     virtual bool
          operator !=( const ICompoundName& anotherPath ) const

  -     ICompoundName& operator =(const ICompoundName& copyMe)

  -     virtual bool
          operator ==( const ICompoundName& anotherPath ) const

  -     virtual void setFullPath(bool isFull)

  -     virtual void truncate(const ICompoundName& relativePath)

  -     virtual void truncate(unsigned long segmentsToRemove)

  IMStreamable

  -     virtual ~IMStreamable()

  -     void externalizeToStream(IDataStream& towhere) const

  -     void internalizeFromStream(IDataStream& fromwhere)

  -     virtual const ITypeRepresentation&
          typeRepresentation() const = 0

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  IMStreamable

  -     IMStreamable()

  -     IMStreamable(const IMStreamable& other)

  -     virtual void readFromStream(IDataStream& fromwhere) = 0

  -     virtual void writeToStream(IDataStream& towhere) const = 0

#### Inherited Protected Data

  - None