<commit_before>Folders
=======

Folder objects represent a folder from a user's account. They can be used to
iterate through a folder's contents, collaborate a folder with another user or
group, and perform other common folder operations (move, copy, delete, etc.).

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Get Information About a Folder](#get-information-about-a-folder)
- [Get the User's Root Folder](#get-the-users-root-folder)
- [Get the Items in a Folder](#get-the-items-in-a-folder)
- [Update a Folder](#update-a-folder)
- [Create a Folder](#create-a-folder)
- [Copy a Folder](#copy-a-folder)
- [Move a Folder](#move-a-folder)
- [Delete a Folder](#delete-a-folder)
- [Create a Shared Link](#create-a-shared-link)
- [Set Metadata](#set-metadata)
- [Get Metadata](#get-metadata)
- [Remove Metadata](#remove-metadata)
- [Get All Metadata](#get-all-metadata)
- [Get Metadata For Folder Items](#get-metadata-for-folder-items)
- [Set a Classification](#set-a-classification)
- [Retrieve a Classification](#retrieve-a-classification)
- [Remove a Classification](#remove-a-classification)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Get Information About a Folder
------------------------------

To retrieve information about a folder, first call [`client.folder(folder_id)`][folder] to initialize the
[`Folder`][folder_class] object.  Then, call [`folder.get(fields=None, etag=None)`][get] to retrieve data about the
folder.  This method returns a new [`Folder][folder_class] object with fields populated by data from the API, leaving
the original object unmodified.

You can pass a list of `fields` to retrieve from the API in order to filter to just the necessary fields or add
ones not returned by default.

<!-- sample get_folders_id -->
```python
folder = client.folder(folder_id='22222').get()
print('Folder "{0}" has {1} items in it'.format(folder.name, folder.item_collection.total_count))
```

[folder]: https://box-python-sdk.readthedocs.io/en/latest/boxsdk.client.html#boxsdk.client.client.Client.folder
[get]: https://box-python-sdk.readthedocs.io/en/latest/boxsdk.object.html#boxsdk.object.item.Item.get
[folder_class]: https://box-python-sdk.readthedocs.io/en/latest/boxsdk.object.html#boxsdk.object.folder.Folder

Get the User's Root Folder
--------------------------

To get the current user's root folder, call [`client.root_folder()`][root_folder] to initialize the appropriate
[`Folder`][folder_class] object.
<commit_msg>Limit line length for get_folders_id (#434)<commit_after>Folders
=======

Folder objects represent a folder from a user's account. They can be used to
iterate through a folder's contents, collaborate a folder with another user or
group, and perform other common folder operations (move, copy, delete, etc.).

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Get Information About a Folder](#get-information-about-a-folder)
- [Get the User's Root Folder](#get-the-users-root-folder)
- [Get the Items in a Folder](#get-the-items-in-a-folder)
- [Update a Folder](#update-a-folder)
- [Create a Folder](#create-a-folder)
- [Copy a Folder](#copy-a-folder)
- [Move a Folder](#move-a-folder)
- [Delete a Folder](#delete-a-folder)
- [Create a Shared Link](#create-a-shared-link)
- [Set Metadata](#set-metadata)
- [Get Metadata](#get-metadata)
- [Remove Metadata](#remove-metadata)
- [Get All Metadata](#get-all-metadata)
- [Get Metadata For Folder Items](#get-metadata-for-folder-items)
- [Set a Classification](#set-a-classification)
- [Retrieve a Classification](#retrieve-a-classification)
- [Remove a Classification](#remove-a-classification)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Get Information About a Folder
------------------------------

To retrieve information about a folder, first call [`client.folder(folder_id)`][folder] to initialize the
[`Folder`][folder_class] object.  Then, call [`folder.get(fields=None, etag=None)`][get] to retrieve data about the
folder.  This method returns a new [`Folder][folder_class] object with fields populated by data from the API, leaving
the original object unmodified.

You can pass a list of `fields` to retrieve from the API in order to filter to just the necessary fields or add
ones not returned by default.

<!-- sample get_folders_id -->
```python
folder = client.folder(folder_id='22222').get()
print('Folder "{0}" has {1} items in it'
      .format(folder.name, folder.item_collection.total_count))
```

[folder]: https://box-python-sdk.readthedocs.io/en/latest/boxsdk.client.html#boxsdk.client.client.Client.folder
[get]: https://box-python-sdk.readthedocs.io/en/latest/boxsdk.object.html#boxsdk.object.item.Item.get
[folder_class]: https://box-python-sdk.readthedocs.io/en/latest/boxsdk.object.html#boxsdk.object.folder.Folder

Get the User's Root Folder
--------------------------

To get the current user's root folder, call [`client.root_folder()`][root_folder] to initialize the appropriate
[`Folder`][folder_class] object.

{'fraction_non_alphanumeric': 0.1557769687679632, 'fraction_numerical': 0.003257328990228013, 'mean_word_length': 4.3538461538461535, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '196430', 'n_tokens_mistral': 1647, 'n_tokens_neox': 1536, 'n_words': 496}