Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

NodePath.GetSubPath Method

Namespace: Rebex.IO.FileSystem
Assembly: Rebex.Common.dll (version 7.0.9147)

GetSubPath(Int32)

Returns a subpath that is a subsequence of the parts of this path. Subpath starts with the first part (on the index 0) of this path and ends with the part on the index subPathEndIndex.

Root path ('/') does not have any subpath.

For the NodePath with the path '/dir1/dir2/file.txt';

GetSubPath(0) returns '/dir1'.

GetSubPath(1) returns '/dir1/dir2'.

GetSubPath(2) returns 'dir1/dir2/file.txt'.

GetSubPath(3) throws ArgumentOutOfRangeException.

Declaration
public NodePath GetSubPath(int subPathEndIndex)
Parameters
Type Name Description
Int32 subPathEndIndex

Zero based index of the end part of the subpath.

Returns
Type Description
NodePath

A subpath that is a subsequence of the parts of this path.

In This Article
  • GetSubPath(Int32)
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies