Ensure Asset
  • 14 May 2021
  • 1 Minute to read
  • Dark
    Light
  • PDF

Ensure Asset

  • Dark
    Light
  • PDF

Article Summary

This is generated from the built in components of Otter 3.0.0, and may be different than what you have installed (especially if you have extensions); go to [User Icon] -> Documentation within your BuildMaster instance to see exactly what operations are available.

Ensure Asset

Ensures the existence of an asset file on a server.

Script usage:

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.

Arguments:

NameFormatScript UsageUsage 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.

Example:

# ensures the config.yml file from the current raft is current on the server
Ensure-Asset config.yml (
    Path: F:\configs
);

Was this article helpful?

What's Next