# Favorite

A **Favorite** object represents a [favorite folder](https://chaoses-ib.gitbook.io/directory-opus/manual/basic_concepts/the_lister/navigation/favorites). It is retrieved by enumerating or indexing the [Favorites](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/favorites)object.

| Property Name      | Return Type                                                                                                                   | Description                                                                                                                                                                                                                                                                                                                                                          |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *\<default value>* | *string*                                                                                                                      | Returns the name of the favorite folder or sub-folder.                                                                                                                                                                                                                                                                                                               |
| folder             | *bool*                                                                                                                        | <p>Returns <strong>True</strong> if this is a sub-folder, <strong>False</strong> if it's a favorite folder or separator.</p><p>If this object is a sub-folder it also behaves like a <a href="favorites"><strong>Favorites</strong></a> object as well as a <strong>Favorite</strong> object, and can be enumerated and have elements added and removed from it.</p> |
| separator          | *bool*                                                                                                                        | Returns **True** if this is a separator.                                                                                                                                                                                                                                                                                                                             |
| path               | *object:*[**Path**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/path) | Returns the path this favorite folder refers to as a [**Path**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/path) object.                                                                                                                                                                                    |

| Method// Name// | **Arguments**                                                                  | Return Type | Description                                                                                                                                                                                                                                                                                                                                            |
| --------------- | ------------------------------------------------------------------------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| SetHeading      | \<string:heading>                                                              | *none*      | <p>If this is a separator (i.e. the <strong>separator</strong> property returns <strong>True</strong>) this lets you make the separator into a heading, or change the heading text.</p><p>Note that changes you make to the list are not saved until you call the <a href="favorites"><strong>Favorites</strong></a><strong>.Save</strong> method.</p> |
| SetName         | \<string:name>                                                                 | *none*      | Changes the name of this favorite folder. Note that changes you make to the list are not saved until you call the [**Favorites**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/favorites)**.Save** method.                                                                                      |
| SetPath         | <p>\<string:path> or<br>\<object:<a href="path"><strong>Path</strong></a>></p> | *none*      | Changes the path this favorite folder refers to. Note that changes you make to the list are not saved until you call the [**Favorites**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/favorites)**.Save** method.                                                                               |
