# os（オペレーティングシステム）

## メソッド <a href="#z1a5y" id="z1a5y"></a>

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

オペレーティングシステムのデフォルトの一時ファイルパスを取得します。

* 戻り値 `string` - オペレーティングシステムのデフォルトの一時ファイルパス

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

***

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

オペレーティングシステムカーネルのバージョン文字列を取得します。

* 戻り値 `string` - オペレーティングシステムカーネルのバージョン文字列

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

***

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

オペレーティングシステム名を返します。\
例：macOSでは `Darwin`、Windowsでは `Windows_NT` を返します。

* 戻り値 `string` - オペレーティングシステム名

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

***

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

オペレーティングシステムのリリースバージョンを返します。

* 戻り値 `string` - オペレーティングシステムのリリースバージョン

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

***

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

オペレーティングシステムのホスト名を返します。

* 戻り値 `string` - オペレーティングシステムのホスト名

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

***

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

現在のユーザーのホームディレクトリを返します。

* 戻り値 `string` - 現在のユーザーのホームディレクトリ

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

***

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

オペレーティングシステムの CPU アーキテクチャを返します。

* 戻り値 `string` - 現在の CPU アーキテクチャ
  * `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/ja-jp/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.
