---
title: "Ensure Asset"
---
Ensures the existence of an asset file on a server.
Ensure-Asset(
Name: <text>,
[Raft: <text>],
[Type: <integer>],
[Exists: <true/false>],
Directory: <text>,
[FileName: <text>]
);
This operation may be prefixed with Files::
, although this is a built-in namespace and isn't really necessary.
Name | Format | Script Usage | Usage Notes |
---|---|---|---|
☆ Asset name | text | Name | This argument is required. |
Raft name | text | Raft | |
Asset type | integer | Type | |
Exists | true/false | Exists | |
☆ Target directory | text | Directory | This argument is required. |
Rename asset to | text | FileName | The name of the file on disk located in the path specified by the Directory argument. If no file name is specified, the operation will use the asset file name. |
# ensures the config.yml file from the current raft is current on the server
Ensure-Asset config.yml (
Path: F:\configs
);