## utilities.CookieUtils


Usage

``` python
utilities.CookieUtils()
```


## Methods

| Name | Description |
|----|----|
| [__init__()](#__init__) | Various utilities to help with cookie specific functionality. |
| [archive()](#archive) | Archive a database directory from a Cookie templated directory structure. |
| [get_size()](#get_size) | Determine the size of a directory or a file with the desired units. |

------------------------------------------------------------------------


#### \_\_init\_\_()


Various utilities to help with cookie specific functionality.


Usage

``` python
__init__()
```


------------------------------------------------------------------------


#### archive()


Archive a database directory from a Cookie templated directory structure.


Usage

``` python
archive(database_path, archive_path, option, delete_flag=False)
```


This utility creates a YAML config dictionary that contains path-like objects for archiving. The original data can be moved to the archive path or deleted all together.


##### Parameters


`database_path: str.`  
A path to a folder that consists of the desired data.

`archive_path: str.`  
A path to an output folder for archived data.

`option: str.`  
An option for the archiving strategy. Will be one of the keys in the archive_options.

`delete_flag: bool. = ``False`  
A flag for deleting the original data. USE WITH CAUTION.


##### Returns


`list.`  
Returns a list of paths to the \*.tar.xz archive of the data and/or a path to the original data.


------------------------------------------------------------------------


#### get_size()


Determine the size of a directory or a file with the desired units.


Usage

``` python
get_size(start_path, units="KB")
```


##### Parameters


`start_path: str.`  
A file or path for sizing up.

`units: str. = ``"KB"`  
The denomination of bytes to return.


##### Returns


`str.`  
The size as a string. (e.g. "3.6 KB")
