> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ansys::Project::Iterator Class Reference

Pointer to a project location.

`#include "Iterator.hpp"`

## Public Member Functions

| Type | Name |
| - | - |
| | [Iterator](#a594b5855557a22cdb9cc1187139c4ad1) () Null iterator contructor ([ok()](#a6bb5a28485002f1fb4c00cdc2cf976d9) is false) |
| | [Iterator](#a33daf764fd080722df0cb9c390c6560c) (const [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_error.md) \&pError) [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_error.md) iterator constructor ([ok()](#a6bb5a28485002f1fb4c00cdc2cf976d9) is false, error message provided) |
| | [Iterator](#a0ae4ca074e1b67627ed2f49dd46f2e16) (const std::shared\_ptr\< PItem > \&pItem) |
| bool | [ok](#a6bb5a28485002f1fb4c00cdc2cf976d9) () const True if the iterator points to a valid location in the project. |
| void | [setError](#a56eca8771563064dc7b3116f0e0672f2) (const [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_error.md) \&pError) Set an error state in the [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md). Will make it invalid (!ok()) |
| const [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_error.md) & | [getError](#aec38d9ec2d30f32b6f4ed1c5fac0e9ce) () const Return the error state of an invalid iterator. An null iteration might not have an error state. |
| bool | [operator==](#a317d4d7238217a0fa08737e071164212) (const [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) \&pObj) const True if the two iterators point to the same target. |
| bool | [operator!=](#a80bc6a41f09e1816d0c21c764b2cb90d) (const [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) \&pObj) const |
| [PItemType](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/namespaceansys_1_1_project#a74245d5b4dc49d6ada20c23b3b3ccf1c) | [getType](#a806047d459b3fbf8e63313f0c63b4608) () const Return the project item type as a PItemType enum. |
| std::string | [getTypeAsString](#a5be13f27e15b5527ef71e0180e436db7) () const Return the project item type as a string. |
| std::string | [getSubclass](#ada0d25c704a48317f707615b9b3e2fc3) () const Return name of the subclass (if any) for the item. |
| std::string | [getName](#ae7939ca49f7fa35d263647aeaf051a71) () const Name of the project item (might differ from [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) filename) |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_error.md) | [rename](#af6e98b115dc4f9db6e7b1d3b6828ba2f) (const std::string \&pName) Rename the project item. |
| [Path](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_path.md) | [getPath](#a6a65a49f2fdfec22ab034b593599aa7f) () const Return the item full [Path](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_path.md) in the project. |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [getParent](#a084e30624583b8205f82992c35d8794b) () const Return the iterator to the parent folder. |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [getParentOfType](#a1f57fe49897538f4a67bfa6edb6293b2) (const std::string \&pType) const Go up in the chain of parent and search for matching [getTypeAsString()](#a5be13f27e15b5527ef71e0180e436db7) |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [getParentOfSubclass](#a455cbbe1bf609ae1b354cee96b3e679b) (const std::string \&pSubclass) const Go up in the chain of parent and search for matching [getSubclass()](#ada0d25c704a48317f707615b9b3e2fc3) |
| void | [accept](#a919fcf1ef24f7666356b7d5848a63948) (Visitor \&pVisitor) |
| int | [getProjectId](#aab5adc1caad321f18f6f2cdb2d7eb6e2) () const Return the unique project ID for this iterator. |
| bool | [isReadOnly](#a01ff77df5630f9ae977803f26cb0d5f5) () const Indicates if the target project or location is read-only. |
| [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_metadata.md) & | [getMeta](#affabcdae62ef0ffe44e5ff877f8b3653) () Returns the [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_metadata.md) for this project item. |
| const [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_metadata.md) & | [getMeta](#a35e6c497d38f92c3c9cc2b26b9e97785) () const Returns a constant reference to the [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_metadata.md) for this project item. |
| [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_metadata.md) & | [getRuntimeMeta](#af210a841db476df453e93e84fe93549f) () Returns a reference to the runtime [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_metadata.md). |
| const [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_metadata.md) & | [getRuntimeMeta](#a6857e0fbb7c49bd4f98b5b7b03444ff6) () const Constant version of [getRuntimeMeta()](#af210a841db476df453e93e84fe93549f) |
| std::vector\< [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) > | [find](#a117905095e2e70e0a2f9dbe051882bec) (const [Query](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_query.md) \&pQuery, bool pFollowSymlink=false) const Execute a [Query](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_query.md) onto the current [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md). |
| bool | [isFile](#ab8a48234efc164e106dbbdfe3043ec5c) () const True if the -valid- pointed object is a File. |
| bool | [isLink](#a193a9a1797874f12bab07d802872dd21) () const True if the -valid- pointed object is a Link. |
| bool | [isFolder](#acc57818eeb26cb02273123c2b20edb44) () const True if the -valid- pointed object is a Folder. |
| bool | [isPropertyTree](#a09733598734e8849313383686785dabe) () const |
| PItem \* | [asItem](#a89d602d9db33b13169bfda9d5bf8d778) () const |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [newFolder](#a574d1cf9ff47a701bf38c13c67bde97f) (const std::string \&pName) Creates a new project-only folder at this location in the project. |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [newFolder](#a55998439518a43793c7131d04efa2bce) (const std::string \&pName, const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) \&pURL) Creates a new folder associated with disk storage. |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [newFile](#a28085f54685920466f5919747fd1e6c7) (const std::string \&pName) Creates a new project-only file at this location in the project. |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [newFile](#a538260eb5797e41839aa9b15006cfca4) (const std::string \&pName, const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) \&pURL, bool pImport=false) Creates a new file associated with disk storage. |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [newLink](#a35a95f29196fab2df7acc6eca623969d) (const std::string \&pName, const [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) \&pTarget) Create a project-level symbolic link. |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [newPropertyTree](#a45f67a70db7cde249230948bb8624e2b) (const std::string \&pName) |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [getChild](#ae5ff58b8d99599faf894fc45004bd4e2) (const std::string \&pName) const Folder - return child item by specified name. |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [get](#af15cea94b62ece204c0300ca4474c6b1) (const [Path](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_path.md) \&pName) const Folder - return child sub-item at specified [Path](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_path.md). |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [getByURL](#a551488127fdf17be8ca6e55eedb398a2) (const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) \&pRelativeURL) const Folder - check if a child points to the specified [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md). |
| std::vector\< std::string > | [getChildNames](#ae11bd1c992f256f83b972902023e6b29) () const Folder - return list of children names. |
| std::vector\< [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) > | [getChildList](#a40e46faef15bb2cdbef2696ea6ab9ba7) () const Folder - return list of children [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md). |
| std::vector\< [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) > | [getChildListOfSubclass](#afc90f99f9352f14ee82fab07259a9332) (std::string pSubclass) const Folder - return list of children [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) of matching subclass. |
| std::vector\< std::string > | [getFolderOtherURLSubItems](#ad7497b9d87b523cc308b26c29b131b44) (bool pFolders) const Folder - return list of files in the folder [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md), unknown by the project. |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_error.md) | [removeItem](#a49587840f2dae46e076dd9a70609f00c) (const std::string \&pName, bool pFlagRecursive=false) Folder - remove an item from the folder. Not erased from storage. |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_error.md) | [moveTo](#afa7f3aa4edebdb0058a7798227fba60b) ([Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) pTargetFolder) [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) - move from current folder to a target folder. |
| void | [setURL](#a18f65f1c4e674fabf4bee6224139fa19) (const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) \&pURL) File/Folder - set the [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) pointed by this item. |
| [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) | [getURL](#afda144cc9e6f2fb7a5854233fbaf0d32) () const File/Folder - returns the [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) pointed by this item. |
| [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) | [getURLFromRoot](#aa12ba7d6bd85e6ed7d21aacc7f8f5ed9) () const File/Folder - returns the relative [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) as computed from the root of the project. |
| [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) | [getFullURL](#a5fc08fff32aa98f45ffe4349d57181d5) () const File/Folder - returns the absolute, including the project location - if suitable. |
| bool | [urlExists](#aaa4c99ef71979870a9d6881d3d23c3a7) () const File/Folder - indicates if the item [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) points to a valid/accessible file/folder. |
| bool | [isURLEditable](#a7a7c732d16715a9a76736d9efeb90afe) () const Indicates if the [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) is ok to be modified by the user. |
| void | [clearChecksum](#a7f065e5a41c622afa8f347c8b3b2781f) () Clear the stored checksum value for the pointed file. |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_error.md) | [computeChecksum](#a872016dbb29dc088c359e534790f0049) (std::string \&pChecksum, bool pFlagStore) Compute a checksum for the stored file. |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_error.md) | [getStoredChecksum](#a598716fb03f14f2c090fbee855660d48) (std::string \&pChecksum) const Get the stored checksum for the file, can be used to compare with the current [computeChecksum()](#a872016dbb29dc088c359e534790f0049) |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [getTarget](#a8605b29d216ee0776f9cfbf19f6abbc2) () const Link - Return the [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) of the link target. |
| std::string | [getTargetStr](#a32c350d0716d8baa56c2f64e7d3ddb55) () const |
| void | [setTarget](#af9eefff266653f0ba03a7d5ac2243c2a) (const [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) \&pIter) Link - Change the [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) of the link target. |
| bool | [isSubProject](#a84aa3bbbd653d0d9970a73ca51407349) () const Link - Indicates if this is a link to a subproject. |
| bool | [operator\<](#a51ecf68257468ed0ac604a0e2fc9d3bc) (const [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) \&pObj) const |

## Protected Attributes

| Type | Name |
| - | - |
| std::weak\_ptr\< PItem > | [aRef](#aa5891e17e1bee802de6ec9e6bbf9cab1) |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_error.md) | [aError](#ad3d051c8c013ef820ac5e20bbbf2b5bc) |

## Detailed Description

Pointer to a project location.

An [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) is a pointer to a project location, the location might be null, invalid or to a good object. The [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) contains a [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_error.md) message, functions returning an [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) as return value might fill the [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) with the error message indicating the failure.

```cpp theme={null}
 Iterator it;
 it.ok() == false;  // null iterator

 it = prj.get("bad path.cas");
 it.ok() == false; // false if not found
 it.getError().getErrorsString(); // string: "Project path should start with /"

 it = prj.get("/Simulation/file.cas");
 it.ok() == true;  // true if found

 prj.closeProject()
 it.ok() == false;  // project has been closed, iterator is now invalid
```

The [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) can be used to execute actions on the pointed object. The [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) has a base type ( [getType()](#a806047d459b3fbf8e63313f0c63b4608) = PIFile, PIFolder, PILink ) and only suitable actions to the target type can be executed, type mismatch or the use of an empty iterator will return an error , error iterator or some default/empty state

```cpp theme={null}
 Iterator it;
 vector<string> childs = it.getChildList(); // empty, no error message
```

## Constructor & Destructor Documentation

### Iterator() \[1/3]

```cpp theme={null}
ansys::Project::Iterator::Iterator()
```

Null iterator contructor ([ok()](#a6bb5a28485002f1fb4c00cdc2cf976d9) is false)

### Iterator() \[2/3]

```cpp theme={null}
ansys::Project::Iterator::Iterator(const Error & pError)
```

[Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_error.md) iterator constructor ([ok()](#a6bb5a28485002f1fb4c00cdc2cf976d9) is false, error message provided)

**Parameters**

| Name | Description |
| - | - |
| pError | [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_error.md) message, will be returned by [getError()](#aec38d9ec2d30f32b6f4ed1c5fac0e9ce) |

### Iterator() \[3/3]

```cpp theme={null}
ansys::Project::Iterator::Iterator(const std::shared_ptr< PItem > & pItem)
```

## Member Function Documentation

### accept()

```cpp theme={null}
void ansys::Project::Iterator::accept(Visitor & pVisitor)
```

### asItem()

```cpp theme={null}
PItem * ansys::Project::Iterator::asItem() const
```

### clearChecksum()

```cpp theme={null}
void ansys::Project::Iterator::clearChecksum()
```

Clear the stored checksum value for the pointed file.

### computeChecksum()

```cpp theme={null}
Error ansys::Project::Iterator::computeChecksum(
    std::string & pChecksum,
    bool pFlagStore
)
```

Compute a checksum for the stored file.

### find()

```cpp theme={null}
std::vector< Iterator > ansys::Project::Iterator::find(
    const Query & pQuery,
    bool pFollowSymlink = false
) const
```

Execute a [Query](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_query.md) onto the current [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md).

* pQuery Search query to be executed
* pFollowSymlink true if the query should go through links or ignore them

**Returns**

The list of [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) matching the query, empty vector if none.

### get()

```cpp theme={null}
Iterator ansys::Project::Iterator::get(const Path & pName) const
```

Folder - return child sub-item at specified [Path](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_path.md).

### getByURL()

```cpp theme={null}
Iterator ansys::Project::Iterator::getByURL(const URL & pRelativeURL) const
```

Folder - check if a child points to the specified [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md).

**Parameters**

| Name | Description |
| - | - |
| pRelativeURL | Relative [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) from the folder location |

### getChild()

```cpp theme={null}
Iterator ansys::Project::Iterator::getChild(const std::string & pName) const
```

Folder - return child item by specified name.

### getChildList()

```cpp theme={null}
std::vector< Iterator > ansys::Project::Iterator::getChildList() const
```

Folder - return list of children [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md).

### getChildListOfSubclass()

```cpp theme={null}
std::vector< Iterator > ansys::Project::Iterator::getChildListOfSubclass(
    std::string pSubclass
) const
```

Folder - return list of children [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) of matching subclass.

Will also traverse subproject links automatically

### getChildNames()

```cpp theme={null}
std::vector< std::string > ansys::Project::Iterator::getChildNames() const
```

Folder - return list of children names.

### getError()

```cpp theme={null}
const Error & ansys::Project::Iterator::getError() const
```

Return the error state of an invalid iterator. An null iteration might not have an error state.

### getFolderOtherURLSubItems()

```cpp theme={null}
std::vector< std::string > ansys::Project::Iterator::getFolderOtherURLSubItems(
    bool pFolders
) const
```

Folder - return list of files in the folder [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md), unknown by the project.

Only works if the folder [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) is accessible.

### getFullURL()

```cpp theme={null}
URL ansys::Project::Iterator::getFullURL() const
```

File/Folder - returns the absolute, including the project location - if suitable.

### getMeta() \[1/2]

```cpp theme={null}
Metadata & ansys::Project::Iterator::getMeta()
```

Returns the [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_metadata.md) for this project item.

The [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_metadata.md) object can be modified and the changes will be stored in the project. If the iterator is not valid, any changes to the [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_metadata.md) are ignored and lost.

### getMeta() \[2/2]

```cpp theme={null}
const Metadata & ansys::Project::Iterator::getMeta() const
```

Returns a constant reference to the [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_metadata.md) for this project item.

The [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_metadata.md) object cannot be modified If the iterator is not valid, the returned [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_metadata.md) is empty

### getName()

```cpp theme={null}
std::string ansys::Project::Iterator::getName() const
```

Name of the project item (might differ from [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) filename)

### getParent()

```cpp theme={null}
Iterator ansys::Project::Iterator::getParent() const
```

Return the iterator to the parent folder.

Returns null iterator in error, or the current iterator is the parent folder of the project already.

### getParentOfSubclass()

```cpp theme={null}
Iterator ansys::Project::Iterator::getParentOfSubclass(const std::string & pSubclass) const
```

Go up in the chain of parent and search for matching [getSubclass()](#ada0d25c704a48317f707615b9b3e2fc3)

### getParentOfType()

```cpp theme={null}
Iterator ansys::Project::Iterator::getParentOfType(const std::string & pType) const
```

Go up in the chain of parent and search for matching [getTypeAsString()](#a5be13f27e15b5527ef71e0180e436db7)

### getPath()

```cpp theme={null}
Path ansys::Project::Iterator::getPath() const
```

Return the item full [Path](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_path.md) in the project.

The [Path](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_path.md) in the project is a global path starting by / and identifying components by their project Name (the project [Path](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_path.md) might differ from the filesystem [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md), or might refer to folders/files which only exist in the project index, and not on disk)

### getProjectId()

```cpp theme={null}
int ansys::Project::Iterator::getProjectId() const
```

Return the unique project ID for this iterator.

Permits to check if an iterator is from a specific project. The project ID might differ across different executions.

### getRuntimeMeta() \[1/2]

```cpp theme={null}
Metadata & ansys::Project::Iterator::getRuntimeMeta()
```

Returns a reference to the runtime [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_metadata.md).

The runtime [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_metadata.md) is a second [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_metadata.md) storage, which contains values which are not saved in the project.

### getRuntimeMeta() \[2/2]

```cpp theme={null}
const Metadata & ansys::Project::Iterator::getRuntimeMeta() const
```

Constant version of [getRuntimeMeta()](#af210a841db476df453e93e84fe93549f)

### getStoredChecksum()

```cpp theme={null}
Error ansys::Project::Iterator::getStoredChecksum(std::string & pChecksum) const
```

Get the stored checksum for the file, can be used to compare with the current [computeChecksum()](#a872016dbb29dc088c359e534790f0049)

### getSubclass()

```cpp theme={null}
std::string ansys::Project::Iterator::getSubclass() const
```

Return name of the subclass (if any) for the item.

See [Simulation](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_simulation.md) , [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) , [Output](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_output.md) , [Result](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_result.md) , etc.

### getTarget()

```cpp theme={null}
Iterator ansys::Project::Iterator::getTarget() const
```

Link - Return the [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) of the link target.

### getTargetStr()

```cpp theme={null}
std::string ansys::Project::Iterator::getTargetStr() const
```

### getType()

```cpp theme={null}
PItemType ansys::Project::Iterator::getType() const
```

Return the project item type as a PItemType enum.

### getTypeAsString()

```cpp theme={null}
std::string ansys::Project::Iterator::getTypeAsString() const
```

Return the project item type as a string.

### getURL()

```cpp theme={null}
URL ansys::Project::Iterator::getURL() const
```

File/Folder - returns the [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) pointed by this item.

See [setURL(const URL&)](#a18f65f1c4e674fabf4bee6224139fa19)

### getURLFromRoot()

```cpp theme={null}
URL ansys::Project::Iterator::getURLFromRoot() const
```

File/Folder - returns the relative [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) as computed from the root of the project.

### isFile()

```cpp theme={null}
bool ansys::Project::Iterator::isFile() const
```

True if the -valid- pointed object is a File.

Checks if the iterator points to an item of the File type in the project index. It might be a project only file or an actual file on disk. See [getURL()](#afda144cc9e6f2fb7a5854233fbaf0d32) and [urlExists()](#aaa4c99ef71979870a9d6881d3d23c3a7)

### isFolder()

```cpp theme={null}
bool ansys::Project::Iterator::isFolder() const
```

True if the -valid- pointed object is a Folder.

Checks if the iterator points to an item of the Folder type in the project index. It might be a project only file or an actual file on disk. See [getURL()](#afda144cc9e6f2fb7a5854233fbaf0d32) and [urlExists()](#aaa4c99ef71979870a9d6881d3d23c3a7)

### isLink()

```cpp theme={null}
bool ansys::Project::Iterator::isLink() const
```

True if the -valid- pointed object is a Link.

Checks if the iterator points to an item of the Link type This is a project-level Link concept created by [newLink()](#a35a95f29196fab2df7acc6eca623969d)

### isPropertyTree()

```cpp theme={null}
bool ansys::Project::Iterator::isPropertyTree() const
```

### isReadOnly()

```cpp theme={null}
bool ansys::Project::Iterator::isReadOnly() const
```

Indicates if the target project or location is read-only.

All iterators of a read-only project are read-only, many iterator actions will have no effect or fail on a read-only project.

### isSubProject()

```cpp theme={null}
bool ansys::Project::Iterator::isSubProject() const
```

Link - Indicates if this is a link to a subproject.

If the link target is not [ok()](#a6bb5a28485002f1fb4c00cdc2cf976d9) means the subproject is not loaded.

### isURLEditable()

```cpp theme={null}
bool ansys::Project::Iterator::isURLEditable() const
```

Indicates if the [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) is ok to be modified by the user.

Two items affect this suggested state:

* [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) are not editable by default is a managed project, are editable by default in a free-storage project
* The runtime metadata 'url-editable' can be set on the iterator, or any parent folder, to 0 or 1

### moveTo()

```cpp theme={null}
Error ansys::Project::Iterator::moveTo(Iterator pTarget)
```

[Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) - move from current folder to a target folder.

This is a project only operation, [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) and disk data need to be udpated separately ([Storage::moveFile()](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_storage.md#a1eb6dbf782620c41e87dda556d3989b8))

**Parameters**

| Name | Description |
| - | - |
| pTarget | Target folder to move to |

### newFile() \[1/2]

```cpp theme={null}
Iterator ansys::Project::Iterator::newFile(const std::string & pName)
```

Creates a new project-only file at this location in the project.

A project-only file is not created in the disk storage, its only stored in the project index. Will fail if : name already in use, target iterator is not a folder, read-only project, etc.

* pName Name of the new project file in project [Path](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_path.md)

### newFile() \[2/2]

```cpp theme={null}
Iterator ansys::Project::Iterator::newFile(
    const std::string & pName,
    const URL & pURL,
    bool pImport = false
)
```

Creates a new file associated with disk storage.

If pURL is empty, the existing [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) name is assumed the same as the pName argument If pImport is enabled, the source [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) is copied in the project folder

```cpp theme={null}
 it.newFile("main-case","file.cas");  // Refers to an existing or future file here
 it.newFile("demo.cas","/mnt/meshes/database.cas"); // file points to some location
 it.newFile("demo2.cas","/mnt/meshes/database.cas",true); // file is copied in folder
```

* pName Name of the new project file in project [Path](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_path.md)
* pURL [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) of the file location
* pImport true if this is an import operation

### newFolder() \[1/2]

```cpp theme={null}
Iterator ansys::Project::Iterator::newFolder(const std::string & pName)
```

Creates a new project-only folder at this location in the project.

A project-only folder is not created in the disk storage, its only stored in the project index. Will fail if : name already in use, target iterator is not a folder, read-only project, etc.

* pName Name of the new project folder in project [Path](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_path.md)

### newFolder() \[2/2]

```cpp theme={null}
Iterator ansys::Project::Iterator::newFolder(
    const std::string & pName,
    const URL & pURL
)
```

Creates a new folder associated with disk storage.

If [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) is empty, and the project is managed, a new folder is created in the filesystem storage of the project.

```cpp theme={null}
 it.newFolder("CADs","");  // A new folder is created on disk, in the project
 it.newFolder("Meshes","/mnt/meshes/"); // folder points to some location
```

If the project is free-storage, an empty [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) will create a project-only folder similar to [newFolder(const std::string&)](#a574d1cf9ff47a701bf38c13c67bde97f);

* pName Name of the new project folder in project [Path](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_path.md)
* pURL [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) of the folder location

### newLink()

```cpp theme={null}
Iterator ansys::Project::Iterator::newLink(
    const std::string & pName,
    const Iterator & pTarget
)
```

Create a project-level symbolic link.

### newPropertyTree()

```cpp theme={null}
Iterator ansys::Project::Iterator::newPropertyTree(const std::string & pName)
```

### ok()

```cpp theme={null}
bool ansys::Project::Iterator::ok() const
```

True if the iterator points to a valid location in the project.

### operator!=()

```cpp theme={null}
bool ansys::Project::Iterator::operator!=(const Iterator & pObj) const
```

`inline`

### operator\<()

```cpp theme={null}
bool ansys::Project::Iterator::operator<(const Iterator & pObj) const
```

`inline`

### operator==()

```cpp theme={null}
bool ansys::Project::Iterator::operator==(const Iterator & pObj) const
```

True if the two iterators point to the same target.

Invalid/error iterator will always be unequal to another iterator

### removeItem()

```cpp theme={null}
Error ansys::Project::Iterator::removeItem(
    const std::string & pName,
    bool pFlagRecursive = false
)
```

Folder - remove an item from the folder. Not erased from storage.

**Parameters**

| Name | Description |
| - | - |
| pFlagRecursive | - true will erase a subfolder and its content |

### rename()

```cpp theme={null}
Error ansys::Project::Iterator::rename(const std::string & pName)
```

Rename the project item.

### setError()

```cpp theme={null}
void ansys::Project::Iterator::setError(const Error & pError)
```

Set an error state in the [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md). Will make it invalid (!ok())

### setTarget()

```cpp theme={null}
void ansys::Project::Iterator::setTarget(const Iterator & pIter)
```

Link - Change the [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) of the link target.

### setURL()

```cpp theme={null}
void ansys::Project::Iterator::setURL(const URL & pURL)
```

File/Folder - set the [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) pointed by this item.

The [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) can either be relative ( "./filename" ), and is then assumed to be in the enclosing folder [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md). The [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) can also be absolute, and is not tied to the location of the enclosing folder.

### urlExists()

```cpp theme={null}
bool ansys::Project::Iterator::urlExists() const
```

File/Folder - indicates if the item [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_u_r_l.md) points to a valid/accessible file/folder.

## Member Data Documentation

### aError

```cpp theme={null}
Error ansys::Project::Iterator::aError
```

`protected`

### aRef

```cpp theme={null}
std::weak_ptr<PItem> ansys::Project::Iterator::aRef
```

`protected`
