> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# getcustomasset

> 存在する regular workspace file を ExtraContent/<hwid>/ にコピーし、コピーされた asset path の rbxasset:// string を返します。

<div className="real-function-page">
  ```lua theme={null}
  getcustomasset(path: string): string
  ```

  ## エイリアス

  * `getsynasset`

  ## 引数

  <ParamField path={"path"} type={"string"} required>
    separator normalization と workspace-boundary checks の後、workspace 内で解決される path。対象は存在する regular file である必要があります。folders、invalid filenames、DOS device names、blocked extensions は受け付けません。
  </ParamField>

  ## 戻り値

  <ResponseField name={"assetId"} type={"string"}>
    rbxasset://\<hwid>/\<workspace-relative-path> 形式の String。relative path には forward slashes が使われます。
  </ResponseField>

  ## 例

  存在する workspace file を asset folder にコピーし、返された rbxasset path を出力します。

  ```lua theme={null}
  local path = "assets/example.txt"
  writefile(path, "asset bytes")

  local assetId = getcustomasset(path)
  print(assetId)
  print(getsynasset(path))
  ```
</div>
