# os

## Methods <a href="#z1a5y" id="z1a5y"></a>

## tmpdir() <a href="#a6hjz" id="a6hjz"></a>

Get the default temporary file path of the operating system.

* Returns `string` - The default temporary file path of the operating system

```javascript
eagle.os.tmpdir();         // 'C:\\Users\\User\\AppData\\Local\\Temp'
```

***

## version() <a href="#gxw5i" id="gxw5i"></a>

Get the string of the operating system kernel version.

* Returns `string` - The string of the operating system kernel version

```javascript
eagle.os.version();         // 'Windows 10 Home'
```

***

## type() <a href="#jauoc" id="jauoc"></a>

Returns the name of the operating system.\
For example: returns `Darwin` on macOS, and `Windows_NT` on Windows.

* Returns `string` - The name of the operating system

```javascript
eagle.os.type();         // 'Windows_NT', 'Darwin'
```

***

## release() <a href="#jmfqv" id="jmfqv"></a>

Returns the release version of the operating system.

* Returns `string` - The release version of the operating system

```javascript
eagle.os.release();         // '10.0.22621'
```

***

## hostname() <a href="#w5b2t" id="w5b2t"></a>

Returns the hostname of the operating system.

* Returns `string` - The hostname of the operating system

```javascript
eagle.os.hostname();         // 'My_Windows'
```

***

## homedir() <a href="#iiwv7" id="iiwv7"></a>

Returns the home directory of the current user.

* Returns `string` - The home directory of the current user

```javascript
eagle.os.homedir();         // 'C:\\Users\\User'
```

***

## arch() <a href="#eekcv" id="eekcv"></a>

Returns the CPU architecture of the operating system.

* Returns `string` - The current CPU architecture
  * `x64`
  * `arm64`
  * `x86`

```javascript
eagle.os.arch();         // 'x64'
```

### &#x20;<a href="#nptwx" id="nptwx"></a>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.eagle.cool/plugin-api/api/os.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
