> ## 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

> Copie un regular workspace file existant vers ExtraContent/<hwid>/ et renvoie un rbxasset:// string pour le asset path copie.

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

  ## Alias

  * `getsynasset`

  ## Arguments

  <ParamField path={"path"} type={"string"} required>
    Path resolu dans le workspace apres separator normalization et workspace-boundary checks. La cible doit exister et etre un regular file; folders, invalid filenames, DOS device names et blocked extensions ne sont pas acceptes.
  </ParamField>

  ## Retours

  <ResponseField name={"assetId"} type={"string"}>
    String au format rbxasset://\<hwid>/\<workspace-relative-path>, avec des forward slashes pour le relative path.
  </ResponseField>

  ## Exemple

  Copie un workspace file existant dans le asset folder et affiche le rbxasset path renvoye.

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

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