> For the complete documentation index, see [llms.txt](https://chaoses-ib.gitbook.io/directory-opus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/tabstats.md).

# TabStats

The **TabStats** object provides various information and statistics about the current folder displayed in a tab. Note that the [**Tab**](/directory-opus/manual/reference/scripting_reference/scripting_objects/tab.md) object provides two versions of this object. **Tab.selstats** takes [Checkbox Mode](/directory-opus/manual/basic_concepts/selecting_files/selecting_with_the_mouse_and_keyboard/checkbox_mode.md) into account, and in this mode the values of the "checked" and the "selected" properties will be the same. If the object was retrieved via **Tab.stats** and the file display is in Checkbox Mode, the two sets of properties will be different.

| Property Name      | Return Type                                                                                                 | Description                                                                                                                                                                |
| ------------------ | ----------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| bigimage\_h        | *int*                                                                                                       | Returns the width in pixels of the largest image in the folder.                                                                                                            |
| bigimage\_w        | *int*                                                                                                       | Returns the height in pixels of the largest image in the folder.                                                                                                           |
| bytes              | *object:*[**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md) | Returns the total number of bytes in the folder as a [**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md) object.            |
| checkbox\_mode     | *bool*                                                                                                      | Returns **True** if the tab is currently in [Checkbox Mode](/directory-opus/manual/basic_concepts/selecting_files/selecting_with_the_mouse_and_keyboard/checkbox_mode.md). |
| checkedbytes       | *object:*[**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md) | Returns the total number of bytes in checked items as a [**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md) object.         |
| checkeddirbytes    | *object:*[**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md) | Returns the total number of bytes in checked folders as a [**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md) object.       |
| checkeddirs        | *int*                                                                                                       | Returns the total number of checked folders.                                                                                                                               |
| checkedfilebytes   | *object:*[**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md) | Returns the total number of bytes in checked files as a [**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md) object.         |
| checkedfiles       | *int*                                                                                                       | Returns the total number of checked files.                                                                                                                                 |
| checkeditems       | *int*                                                                                                       | Returns the total number of checked items.                                                                                                                                 |
| checkedmusiclength | *int*                                                                                                       | Returns the total length in seconds of all checked music files.                                                                                                            |
| dirbytes           | *object:*[**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md) | Returns the total number of bytes in all folders as a [**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md) object.           |
| dirs               | *int*                                                                                                       | Returns the total number of folders.                                                                                                                                       |
| filebytes          | *object:*[**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md) | Returns the total number of bytes in all files as a [**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md) object.             |
| filedate\_max      | *date*                                                                                                      | Returns the latest (most recent) file date in the folder.                                                                                                                  |
| filedate\_min      | *date*                                                                                                      | Returns the earliest (oldest) file date in the folder.                                                                                                                     |
| files              | *int*                                                                                                       | Returns the total number of files.                                                                                                                                         |
| items              | *int*                                                                                                       | Returns the total number of items.                                                                                                                                         |
| largestfile        | *object:*[**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md) | Returns the size of the largest file in the folder as a [**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md) object.         |
| musiclength        | *int*                                                                                                       | Returns the total length in seconds of all music files.                                                                                                                    |
| selbytes           | *object:*[**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md) | Returns the total number of bytes in all selected items as a [**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md) object.    |
| seldirbytes        | *object:*[**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md) | Returns the total number of bytes in all selected folders as a [**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md) object.  |
| seldirs            | *int*                                                                                                       | Returns the number of selected folders.                                                                                                                                    |
| selfilebytes       | *object:*[**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md) | Returns the total number of bytes in all selected files as a [**FileSize**](/directory-opus/manual/reference/scripting_reference/scripting_objects/filesize.md) object.    |
| selfiles           | *int*                                                                                                       | Returns the number of selected files.                                                                                                                                      |
| selitems           | *int*                                                                                                       | Returns the number of selected items.                                                                                                                                      |
| selmusiclength     | *int*                                                                                                       | Returns the total length in seconds of all selected music files.                                                                                                           |

| Method Name | **Arguments** | Return Type | Description                                                                                                                                                                                                                                                                                                                                  |
| ----------- | ------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Update      | *none*        | *none*      | The first time a script accesses a particular **TabStats** object, a snapshot is taken of the tab state. If the script then makes changes to that tab (e.g. it selects files, creates a new folder, etc), these changes will not be reflected by the object. To re-synchronize the object with the tab, call the **TabStats.Update** method. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/tabstats.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
