    

 ## On this page

  

 

 # ansys::Project::Iterator Class Reference

 Last update: 19.05.2025 

Pointer to a project location. [More...](classansys_1_1_project_1_1_iterator.xhtml#details)

`#include "Iterator.hpp"`

## <a id="pub-methods" name="pub-methods"></a>Public Member Functions

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

std::weak\_ptr&lt; PItem &gt; [aRef](classansys_1_1_project_1_1_iterator.xhtml#aa5891e17e1bee802de6ec9e6bbf9cab1) [Error](classansys_1_1_project_1_1_error.xhtml) [aError](classansys_1_1_project_1_1_iterator.xhtml#ad3d051c8c013ef820ac5e20bbbf2b5bc) <a id="details" name="details"></a>## Detailed Description

Pointer to a project location.

An [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.") is a pointer to a project location, the location might be null, invalid or to a good object. The [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.") contains a [Error](classansys_1_1_project_1_1_error.xhtml "The return state / error value of a Project function call.") message, functions returning an [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.") as return value might fill the [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.") with the error message indicating the failure.

```
 Iterator it;
 it.ok() == false;  // null iterator
<p>it = prj.get("bad path.cas");
it.ok() == false; // false if not found
it.getError().getErrorsString(); // string: "Project path should start with /"</p>
<p>it = prj.get("/Simulation/file.cas");
it.ok() == true;  // true if found</p>
<p>prj.closeProject()
it.ok() == false;  // project has been closed, iterator is now invalid
</p>
```

 The [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.") can be used to execute actions on the pointed object. The [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.") has a base type ( [getType()](classansys_1_1_project_1_1_iterator.xhtml#a806047d459b3fbf8e63313f0c63b4608 "Return the project item type as a PItemType enum.") = 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

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



## Constructor &amp; Destructor Documentation

<a id="a594b5855557a22cdb9cc1187139c4ad1" name="a594b5855557a22cdb9cc1187139c4ad1"></a>## [◆ ](#a594b5855557a22cdb9cc1187139c4ad1)Iterator() \[1/3\]

 ansys::Project::Iterator::Iterator  ( ) 

Null iterator contructor ([ok()](classansys_1_1_project_1_1_iterator.xhtml#a6bb5a28485002f1fb4c00cdc2cf976d9 "True if the iterator points to a valid location in the project.") is false)





<a id="a33daf764fd080722df0cb9c390c6560c" name="a33daf764fd080722df0cb9c390c6560c"></a>## [◆ ](#a33daf764fd080722df0cb9c390c6560c)Iterator() \[2/3\]

 ansys::Project::Iterator::Iterator  ( const [Error](classansys_1_1_project_1_1_error.xhtml) &amp;  *pError*) 

[Error](classansys_1_1_project_1_1_error.xhtml "The return state / error value of a Project function call.") iterator constructor ([ok()](classansys_1_1_project_1_1_iterator.xhtml#a6bb5a28485002f1fb4c00cdc2cf976d9 "True if the iterator points to a valid location in the project.") is false, error message provided)

Parameters pError[Error](classansys_1_1_project_1_1_error.xhtml "The return state / error value of a Project function call.") message, will be returned by [getError()](classansys_1_1_project_1_1_iterator.xhtml#aec38d9ec2d30f32b6f4ed1c5fac0e9ce "Return the error state of an invalid iterator. An null iteration might not have an error state.") 



<a id="a0ae4ca074e1b67627ed2f49dd46f2e16" name="a0ae4ca074e1b67627ed2f49dd46f2e16"></a>## [◆ ](#a0ae4ca074e1b67627ed2f49dd46f2e16)Iterator() \[3/3\]

 ansys::Project::Iterator::Iterator  ( const std::shared\_ptr&lt; PItem &gt; &amp;  *pItem*) 





## Member Function Documentation

<a id="a919fcf1ef24f7666356b7d5848a63948" name="a919fcf1ef24f7666356b7d5848a63948"></a>## [◆ ](#a919fcf1ef24f7666356b7d5848a63948)accept()

 void ansys::Project::Iterator::accept  ( Visitor &amp;  *pVisitor*) 





<a id="a89d602d9db33b13169bfda9d5bf8d778" name="a89d602d9db33b13169bfda9d5bf8d778"></a>## [◆ ](#a89d602d9db33b13169bfda9d5bf8d778)asItem()

 PItem \* ansys::Project::Iterator::asItem  ( )  const





<a id="a7f065e5a41c622afa8f347c8b3b2781f" name="a7f065e5a41c622afa8f347c8b3b2781f"></a>## [◆ ](#a7f065e5a41c622afa8f347c8b3b2781f)clearChecksum()

 void ansys::Project::Iterator::clearChecksum  ( ) 

Clear the stored checksum value for the pointed file.





<a id="a872016dbb29dc088c359e534790f0049" name="a872016dbb29dc088c359e534790f0049"></a>## [◆ ](#a872016dbb29dc088c359e534790f0049)computeChecksum()

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Iterator::computeChecksum  ( std::string &amp;  *pChecksum*,    bool  *pFlagStore*   ) 

Compute a checksum for the stored file.





<a id="a117905095e2e70e0a2f9dbe051882bec" name="a117905095e2e70e0a2f9dbe051882bec"></a>## [◆ ](#a117905095e2e70e0a2f9dbe051882bec)find()

 std::vector&lt; [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &gt; ansys::Project::Iterator::find  ( const [Query](classansys_1_1_project_1_1_query.xhtml) &amp;  *pQuery*,    bool  *pFollowSymlink* = `false`   )  const

Execute a [Query](classansys_1_1_project_1_1_query.xhtml "Set of conditions used in search within the Project. See Iterator::find()") onto the current [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.").

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

ReturnsThe list of [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.") matching the query, empty vector if none. 



<a id="af15cea94b62ece204c0300ca4474c6b1" name="af15cea94b62ece204c0300ca4474c6b1"></a>## [◆ ](#af15cea94b62ece204c0300ca4474c6b1)get()

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::Iterator::get  ( const [Path](classansys_1_1_project_1_1_path.xhtml) &amp;  *pName*)  const

Folder - return child sub-item at specified [Path](classansys_1_1_project_1_1_path.xhtml "Paths used for internal Project filesystem.").





<a id="a551488127fdf17be8ca6e55eedb398a2" name="a551488127fdf17be8ca6e55eedb398a2"></a>## [◆ ](#a551488127fdf17be8ca6e55eedb398a2)getByURL()

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::Iterator::getByURL  ( const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;  *pRelativeURL*)  const

Folder - check if a child points to the specified [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.").

Parameters pRelativeURLRelative [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") from the folder location 



<a id="ae5ff58b8d99599faf894fc45004bd4e2" name="ae5ff58b8d99599faf894fc45004bd4e2"></a>## [◆ ](#ae5ff58b8d99599faf894fc45004bd4e2)getChild()

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::Iterator::getChild  ( const std::string &amp;  *pName*)  const

Folder - return child item by specified name.





<a id="a40e46faef15bb2cdbef2696ea6ab9ba7" name="a40e46faef15bb2cdbef2696ea6ab9ba7"></a>## [◆ ](#a40e46faef15bb2cdbef2696ea6ab9ba7)getChildList()

 std::vector&lt; [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &gt; ansys::Project::Iterator::getChildList  ( )  const

Folder - return list of children [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.").





<a id="afc90f99f9352f14ee82fab07259a9332" name="afc90f99f9352f14ee82fab07259a9332"></a>## [◆ ](#afc90f99f9352f14ee82fab07259a9332)getChildListOfSubclass()

 std::vector&lt; [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &gt; ansys::Project::Iterator::getChildListOfSubclass  ( std::string  *pSubclass*)  const

Folder - return list of children [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.") of matching subclass.

Will also traverse subproject links automatically





<a id="ae11bd1c992f256f83b972902023e6b29" name="ae11bd1c992f256f83b972902023e6b29"></a>## [◆ ](#ae11bd1c992f256f83b972902023e6b29)getChildNames()

 std::vector&lt; std::string &gt; ansys::Project::Iterator::getChildNames  ( )  const

Folder - return list of children names.





<a id="aec38d9ec2d30f32b6f4ed1c5fac0e9ce" name="aec38d9ec2d30f32b6f4ed1c5fac0e9ce"></a>## [◆ ](#aec38d9ec2d30f32b6f4ed1c5fac0e9ce)getError()

 const [Error](classansys_1_1_project_1_1_error.xhtml) &amp; ansys::Project::Iterator::getError  ( )  const

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





<a id="ad7497b9d87b523cc308b26c29b131b44" name="ad7497b9d87b523cc308b26c29b131b44"></a>## [◆ ](#ad7497b9d87b523cc308b26c29b131b44)getFolderOtherURLSubItems()

 std::vector&lt; std::string &gt; ansys::Project::Iterator::getFolderOtherURLSubItems  ( bool  *pFolders*)  const

Folder - return list of files in the folder [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format."), unknown by the project.

Only works if the folder [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") is accessible.





<a id="a5fc08fff32aa98f45ffe4349d57181d5" name="a5fc08fff32aa98f45ffe4349d57181d5"></a>## [◆ ](#a5fc08fff32aa98f45ffe4349d57181d5)getFullURL()

 [URL](classansys_1_1_project_1_1_u_r_l.xhtml) ansys::Project::Iterator::getFullURL  ( )  const

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





<a id="affabcdae62ef0ffe44e5ff877f8b3653" name="affabcdae62ef0ffe44e5ff877f8b3653"></a>## [◆ ](#affabcdae62ef0ffe44e5ff877f8b3653)getMeta() \[1/2\]

 [Metadata](classansys_1_1_project_1_1_metadata.xhtml) &amp; ansys::Project::Iterator::getMeta  ( ) 

Returns the [Metadata](classansys_1_1_project_1_1_metadata.xhtml "Dictionary of values associated with an Iterator.") for this project item.

The [Metadata](classansys_1_1_project_1_1_metadata.xhtml "Dictionary of values associated with an Iterator.") object can be modified and the changes will be stored in the project. If the iterator is not valid, any changes to the [Metadata](classansys_1_1_project_1_1_metadata.xhtml "Dictionary of values associated with an Iterator.") are ignored and lost.





<a id="a35e6c497d38f92c3c9cc2b26b9e97785" name="a35e6c497d38f92c3c9cc2b26b9e97785"></a>## [◆ ](#a35e6c497d38f92c3c9cc2b26b9e97785)getMeta() \[2/2\]

 const [Metadata](classansys_1_1_project_1_1_metadata.xhtml) &amp; ansys::Project::Iterator::getMeta  ( )  const

Returns a constant reference to the [Metadata](classansys_1_1_project_1_1_metadata.xhtml "Dictionary of values associated with an Iterator.") for this project item.

The [Metadata](classansys_1_1_project_1_1_metadata.xhtml "Dictionary of values associated with an Iterator.") object cannot be modified If the iterator is not valid, the returned [Metadata](classansys_1_1_project_1_1_metadata.xhtml "Dictionary of values associated with an Iterator.") is empty





<a id="ae7939ca49f7fa35d263647aeaf051a71" name="ae7939ca49f7fa35d263647aeaf051a71"></a>## [◆ ](#ae7939ca49f7fa35d263647aeaf051a71)getName()

 std::string ansys::Project::Iterator::getName  ( )  const

Name of the project item (might differ from [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") filename)





<a id="a084e30624583b8205f82992c35d8794b" name="a084e30624583b8205f82992c35d8794b"></a>## [◆ ](#a084e30624583b8205f82992c35d8794b)getParent()

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) 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.





<a id="a455cbbe1bf609ae1b354cee96b3e679b" name="a455cbbe1bf609ae1b354cee96b3e679b"></a>## [◆ ](#a455cbbe1bf609ae1b354cee96b3e679b)getParentOfSubclass()

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::Iterator::getParentOfSubclass  ( const std::string &amp;  *pSubclass*)  const

Go up in the chain of parent and search for matching [getSubclass()](classansys_1_1_project_1_1_iterator.xhtml#ada0d25c704a48317f707615b9b3e2fc3 "Return name of the subclass (if any) for the item.")





<a id="a1f57fe49897538f4a67bfa6edb6293b2" name="a1f57fe49897538f4a67bfa6edb6293b2"></a>## [◆ ](#a1f57fe49897538f4a67bfa6edb6293b2)getParentOfType()

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::Iterator::getParentOfType  ( const std::string &amp;  *pType*)  const

Go up in the chain of parent and search for matching [getTypeAsString()](classansys_1_1_project_1_1_iterator.xhtml#a5be13f27e15b5527ef71e0180e436db7 "Return the project item type as a string.")





<a id="a6a65a49f2fdfec22ab034b593599aa7f" name="a6a65a49f2fdfec22ab034b593599aa7f"></a>## [◆ ](#a6a65a49f2fdfec22ab034b593599aa7f)getPath()

 [Path](classansys_1_1_project_1_1_path.xhtml) ansys::Project::Iterator::getPath  ( )  const

Return the item full [Path](classansys_1_1_project_1_1_path.xhtml "Paths used for internal Project filesystem.") in the project.

The [Path](classansys_1_1_project_1_1_path.xhtml "Paths used for internal Project filesystem.") in the project is a global path starting by / and identifying components by their project Name (the project [Path](classansys_1_1_project_1_1_path.xhtml "Paths used for internal Project filesystem.") might differ from the filesystem [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format."), or might refer to folders/files which only exist in the project index, and not on disk)





<a id="aab5adc1caad321f18f6f2cdb2d7eb6e2" name="aab5adc1caad321f18f6f2cdb2d7eb6e2"></a>## [◆ ](#aab5adc1caad321f18f6f2cdb2d7eb6e2)getProjectId()

 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.





<a id="af210a841db476df453e93e84fe93549f" name="af210a841db476df453e93e84fe93549f"></a>## [◆ ](#af210a841db476df453e93e84fe93549f)getRuntimeMeta() \[1/2\]

 [Metadata](classansys_1_1_project_1_1_metadata.xhtml) &amp; ansys::Project::Iterator::getRuntimeMeta  ( ) 

Returns a reference to the runtime [Metadata](classansys_1_1_project_1_1_metadata.xhtml "Dictionary of values associated with an Iterator.").

The runtime [Metadata](classansys_1_1_project_1_1_metadata.xhtml "Dictionary of values associated with an Iterator.") is a second [Metadata](classansys_1_1_project_1_1_metadata.xhtml "Dictionary of values associated with an Iterator.") storage, which contains values which are not saved in the project.





<a id="a6857e0fbb7c49bd4f98b5b7b03444ff6" name="a6857e0fbb7c49bd4f98b5b7b03444ff6"></a>## [◆ ](#a6857e0fbb7c49bd4f98b5b7b03444ff6)getRuntimeMeta() \[2/2\]

 const [Metadata](classansys_1_1_project_1_1_metadata.xhtml) &amp; ansys::Project::Iterator::getRuntimeMeta  ( )  const

Constant version of [getRuntimeMeta()](classansys_1_1_project_1_1_iterator.xhtml#af210a841db476df453e93e84fe93549f "Returns a reference to the runtime Metadata.")





<a id="a598716fb03f14f2c090fbee855660d48" name="a598716fb03f14f2c090fbee855660d48"></a>## [◆ ](#a598716fb03f14f2c090fbee855660d48)getStoredChecksum()

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Iterator::getStoredChecksum  ( std::string &amp;  *pChecksum*)  const

Get the stored checksum for the file, can be used to compare with the current [computeChecksum()](classansys_1_1_project_1_1_iterator.xhtml#a872016dbb29dc088c359e534790f0049 "Compute a checksum for the stored file.")





<a id="ada0d25c704a48317f707615b9b3e2fc3" name="ada0d25c704a48317f707615b9b3e2fc3"></a>## [◆ ](#ada0d25c704a48317f707615b9b3e2fc3)getSubclass()

 std::string ansys::Project::Iterator::getSubclass  ( )  const

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

See [Simulation](classansys_1_1_project_1_1_simulation.xhtml "Subfolder of a Project, regrouping input files and Run subfolders.") , [Run](classansys_1_1_project_1_1_run.xhtml "Subfolder of a Simulation, regrouping Output/Result for a step.") , [Output](classansys_1_1_project_1_1_output.xhtml "Subfolder of a Run, regrouping Results for a step.") , [Result](classansys_1_1_project_1_1_result.xhtml "Result (data) file, output of a Simulation Run.") , etc.





<a id="a8605b29d216ee0776f9cfbf19f6abbc2" name="a8605b29d216ee0776f9cfbf19f6abbc2"></a>## [◆ ](#a8605b29d216ee0776f9cfbf19f6abbc2)getTarget()

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::Iterator::getTarget  ( )  const

Link - Return the [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.") of the link target.





<a id="a32c350d0716d8baa56c2f64e7d3ddb55" name="a32c350d0716d8baa56c2f64e7d3ddb55"></a>## [◆ ](#a32c350d0716d8baa56c2f64e7d3ddb55)getTargetStr()

 std::string ansys::Project::Iterator::getTargetStr  ( )  const





<a id="a806047d459b3fbf8e63313f0c63b4608" name="a806047d459b3fbf8e63313f0c63b4608"></a>## [◆ ](#a806047d459b3fbf8e63313f0c63b4608)getType()

 [PItemType](namespaceansys_1_1_project.xhtml#a74245d5b4dc49d6ada20c23b3b3ccf1c) ansys::Project::Iterator::getType  ( )  const

Return the project item type as a PItemType enum.





<a id="a5be13f27e15b5527ef71e0180e436db7" name="a5be13f27e15b5527ef71e0180e436db7"></a>## [◆ ](#a5be13f27e15b5527ef71e0180e436db7)getTypeAsString()

 std::string ansys::Project::Iterator::getTypeAsString  ( )  const

Return the project item type as a string.





<a id="afda144cc9e6f2fb7a5854233fbaf0d32" name="afda144cc9e6f2fb7a5854233fbaf0d32"></a>## [◆ ](#afda144cc9e6f2fb7a5854233fbaf0d32)getURL()

 [URL](classansys_1_1_project_1_1_u_r_l.xhtml) ansys::Project::Iterator::getURL  ( )  const

File/Folder - returns the [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") pointed by this item.

See [setURL(const URL&amp;)](classansys_1_1_project_1_1_iterator.xhtml#a18f65f1c4e674fabf4bee6224139fa19 "File/Folder - set the URL pointed by this item.")





<a id="aa12ba7d6bd85e6ed7d21aacc7f8f5ed9" name="aa12ba7d6bd85e6ed7d21aacc7f8f5ed9"></a>## [◆ ](#aa12ba7d6bd85e6ed7d21aacc7f8f5ed9)getURLFromRoot()

 [URL](classansys_1_1_project_1_1_u_r_l.xhtml) ansys::Project::Iterator::getURLFromRoot  ( )  const

File/Folder - returns the relative [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") as computed from the root of the project.





<a id="ab8a48234efc164e106dbbdfe3043ec5c" name="ab8a48234efc164e106dbbdfe3043ec5c"></a>## [◆ ](#ab8a48234efc164e106dbbdfe3043ec5c)isFile()

 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()](classansys_1_1_project_1_1_iterator.xhtml#afda144cc9e6f2fb7a5854233fbaf0d32 "File/Folder - returns the URL pointed by this item.") and [urlExists()](classansys_1_1_project_1_1_iterator.xhtml#aaa4c99ef71979870a9d6881d3d23c3a7 "File/Folder - indicates if the item URL points to a valid/accessible file/folder.")





<a id="acc57818eeb26cb02273123c2b20edb44" name="acc57818eeb26cb02273123c2b20edb44"></a>## [◆ ](#acc57818eeb26cb02273123c2b20edb44)isFolder()

 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()](classansys_1_1_project_1_1_iterator.xhtml#afda144cc9e6f2fb7a5854233fbaf0d32 "File/Folder - returns the URL pointed by this item.") and [urlExists()](classansys_1_1_project_1_1_iterator.xhtml#aaa4c99ef71979870a9d6881d3d23c3a7 "File/Folder - indicates if the item URL points to a valid/accessible file/folder.")





<a id="a193a9a1797874f12bab07d802872dd21" name="a193a9a1797874f12bab07d802872dd21"></a>## [◆ ](#a193a9a1797874f12bab07d802872dd21)isLink()

 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()](classansys_1_1_project_1_1_iterator.xhtml#a35a95f29196fab2df7acc6eca623969d "Create a project-level symbolic link.")





<a id="a09733598734e8849313383686785dabe" name="a09733598734e8849313383686785dabe"></a>## [◆ ](#a09733598734e8849313383686785dabe)isPropertyTree()

 bool ansys::Project::Iterator::isPropertyTree  ( )  const





<a id="a01ff77df5630f9ae977803f26cb0d5f5" name="a01ff77df5630f9ae977803f26cb0d5f5"></a>## [◆ ](#a01ff77df5630f9ae977803f26cb0d5f5)isReadOnly()

 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.





<a id="a84aa3bbbd653d0d9970a73ca51407349" name="a84aa3bbbd653d0d9970a73ca51407349"></a>## [◆ ](#a84aa3bbbd653d0d9970a73ca51407349)isSubProject()

 bool ansys::Project::Iterator::isSubProject  ( )  const

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

If the link target is not [ok()](classansys_1_1_project_1_1_iterator.xhtml#a6bb5a28485002f1fb4c00cdc2cf976d9 "True if the iterator points to a valid location in the project.") means the subproject is not loaded.





<a id="a7a7c732d16715a9a76736d9efeb90afe" name="a7a7c732d16715a9a76736d9efeb90afe"></a>## [◆ ](#a7a7c732d16715a9a76736d9efeb90afe)isURLEditable()

 bool ansys::Project::Iterator::isURLEditable  ( )  const

Indicates if the [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") is ok to be modified by the user.

Two items affect this suggested state:

- [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") 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





<a id="afa7f3aa4edebdb0058a7798227fba60b" name="afa7f3aa4edebdb0058a7798227fba60b"></a>## [◆ ](#afa7f3aa4edebdb0058a7798227fba60b)moveTo()

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Iterator::moveTo  ( [Iterator](classansys_1_1_project_1_1_iterator.xhtml)  *pTarget*) 

[Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.") - move from current folder to a target folder.

This is a project only operation, [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") and disk data need to be udpated separately ([Storage::moveFile()](classansys_1_1_project_1_1_storage.xhtml#a1eb6dbf782620c41e87dda556d3989b8 "Rename the file or folder."))

Parameters pTargetTarget folder to move to 



<a id="a28085f54685920466f5919747fd1e6c7" name="a28085f54685920466f5919747fd1e6c7"></a>## [◆ ](#a28085f54685920466f5919747fd1e6c7)newFile() \[1/2\]

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::Iterator::newFile  ( const std::string &amp;  *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](classansys_1_1_project_1_1_path.xhtml "Paths used for internal Project filesystem.")





<a id="a538260eb5797e41839aa9b15006cfca4" name="a538260eb5797e41839aa9b15006cfca4"></a>## [◆ ](#a538260eb5797e41839aa9b15006cfca4)newFile() \[2/2\]

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::Iterator::newFile  ( const std::string &amp;  *pName*,    const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;  *pURL*,    bool  *pImport* = `false`   ) 

Creates a new file associated with disk storage.

If pURL is empty, the existing [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") name is assumed the same as the pName argument If pImport is enabled, the source [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") is copied in the project folder

```
 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](classansys_1_1_project_1_1_path.xhtml "Paths used for internal Project filesystem.")
- pURL [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") of the file location
- pImport true if this is an import operation





<a id="a574d1cf9ff47a701bf38c13c67bde97f" name="a574d1cf9ff47a701bf38c13c67bde97f"></a>## [◆ ](#a574d1cf9ff47a701bf38c13c67bde97f)newFolder() \[1/2\]

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::Iterator::newFolder  ( const std::string &amp;  *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](classansys_1_1_project_1_1_path.xhtml "Paths used for internal Project filesystem.")





<a id="a55998439518a43793c7131d04efa2bce" name="a55998439518a43793c7131d04efa2bce"></a>## [◆ ](#a55998439518a43793c7131d04efa2bce)newFolder() \[2/2\]

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::Iterator::newFolder  ( const std::string &amp;  *pName*,    const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;  *pURL*   ) 

Creates a new folder associated with disk storage.

If [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") is empty, and the project is managed, a new folder is created in the filesystem storage of the project.

```
 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](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") will create a project-only folder similar to [newFolder(const std::string&amp;)](classansys_1_1_project_1_1_iterator.xhtml#a574d1cf9ff47a701bf38c13c67bde97f "Creates a new project-only folder at this location in the project.");

- pName Name of the new project folder in project [Path](classansys_1_1_project_1_1_path.xhtml "Paths used for internal Project filesystem.")
- pURL [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") of the folder location





<a id="a35a95f29196fab2df7acc6eca623969d" name="a35a95f29196fab2df7acc6eca623969d"></a>## [◆ ](#a35a95f29196fab2df7acc6eca623969d)newLink()

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::Iterator::newLink  ( const std::string &amp;  *pName*,    const [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &amp;  *pTarget*   ) 

Create a project-level symbolic link.





<a id="a45f67a70db7cde249230948bb8624e2b" name="a45f67a70db7cde249230948bb8624e2b"></a>## [◆ ](#a45f67a70db7cde249230948bb8624e2b)newPropertyTree()

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::Iterator::newPropertyTree  ( const std::string &amp;  *pName*) 





<a id="a6bb5a28485002f1fb4c00cdc2cf976d9" name="a6bb5a28485002f1fb4c00cdc2cf976d9"></a>## [◆ ](#a6bb5a28485002f1fb4c00cdc2cf976d9)ok()

 bool ansys::Project::Iterator::ok  ( )  const

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





<a id="a80bc6a41f09e1816d0c21c764b2cb90d" name="a80bc6a41f09e1816d0c21c764b2cb90d"></a>## [◆ ](#a80bc6a41f09e1816d0c21c764b2cb90d)operator!=()

 bool ansys::Project::Iterator::operator!=  ( const [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &amp;  *pObj*)  const  inline 





<a id="a51ecf68257468ed0ac604a0e2fc9d3bc" name="a51ecf68257468ed0ac604a0e2fc9d3bc"></a>## [◆ ](#a51ecf68257468ed0ac604a0e2fc9d3bc)operator&lt;()

 bool ansys::Project::Iterator::operator&lt;  ( const [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &amp;  *pObj*)  const  inline 





<a id="a317d4d7238217a0fa08737e071164212" name="a317d4d7238217a0fa08737e071164212"></a>## [◆ ](#a317d4d7238217a0fa08737e071164212)operator==()

 bool ansys::Project::Iterator::operator==  ( const [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &amp;  *pObj*)  const

True if the two iterators point to the same target.

Invalid/error iterator will always be unequal to another iterator





<a id="a49587840f2dae46e076dd9a70609f00c" name="a49587840f2dae46e076dd9a70609f00c"></a>## [◆ ](#a49587840f2dae46e076dd9a70609f00c)removeItem()

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Iterator::removeItem  ( const std::string &amp;  *pName*,    bool  *pFlagRecursive* = `false`   ) 

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

Parameters pFlagRecursive- true will erase a subfolder and its content 



<a id="af6e98b115dc4f9db6e7b1d3b6828ba2f" name="af6e98b115dc4f9db6e7b1d3b6828ba2f"></a>## [◆ ](#af6e98b115dc4f9db6e7b1d3b6828ba2f)rename()

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Iterator::rename  ( const std::string &amp;  *pName*) 

Rename the project item.





<a id="a56eca8771563064dc7b3116f0e0672f2" name="a56eca8771563064dc7b3116f0e0672f2"></a>## [◆ ](#a56eca8771563064dc7b3116f0e0672f2)setError()

 void ansys::Project::Iterator::setError  ( const [Error](classansys_1_1_project_1_1_error.xhtml) &amp;  *pError*) 

Set an error state in the [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location."). Will make it invalid (!ok())





<a id="af9eefff266653f0ba03a7d5ac2243c2a" name="af9eefff266653f0ba03a7d5ac2243c2a"></a>## [◆ ](#af9eefff266653f0ba03a7d5ac2243c2a)setTarget()

 void ansys::Project::Iterator::setTarget  ( const [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &amp;  *pIter*) 

Link - Change the [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.") of the link target.





<a id="a18f65f1c4e674fabf4bee6224139fa19" name="a18f65f1c4e674fabf4bee6224139fa19"></a>## [◆ ](#a18f65f1c4e674fabf4bee6224139fa19)setURL()

 void ansys::Project::Iterator::setURL  ( const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;  *pURL*) 

File/Folder - set the [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") pointed by this item.

The [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") can either be relative ( "./filename" ), and is then assumed to be in the enclosing folder [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format."). The [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") can also be absolute, and is not tied to the location of the enclosing folder.





<a id="aaa4c99ef71979870a9d6881d3d23c3a7" name="aaa4c99ef71979870a9d6881d3d23c3a7"></a>## [◆ ](#aaa4c99ef71979870a9d6881d3d23c3a7)urlExists()

 bool ansys::Project::Iterator::urlExists  ( )  const

File/Folder - indicates if the item [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") points to a valid/accessible file/folder.





## Member Data Documentation

<a id="ad3d051c8c013ef820ac5e20bbbf2b5bc" name="ad3d051c8c013ef820ac5e20bbbf2b5bc"></a>## [◆ ](#ad3d051c8c013ef820ac5e20bbbf2b5bc)aError

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Iterator::aError  protected 





<a id="aa5891e17e1bee802de6ec9e6bbf9cab1" name="aa5891e17e1bee802de6ec9e6bbf9cab1"></a>## [◆ ](#aa5891e17e1bee802de6ec9e6bbf9cab1)aRef

 std::weak\_ptr&lt;PItem&gt; ansys::Project::Iterator::aRef  protected