Main Content

getFileExtension

Class: coder.make.BuildTool
Namespace: coder.make

Get file extension for named file type in FileExtensions

Syntax

value = h.getFileExtension(name)

Description

value = h.getFileExtension(name) gets the file extension of the named file type from coder.make.BuildTool.FileExtensions.

Input Arguments

expand all

Object handle for a coder.make.BuildTool object, specified as a variable.

Example: tool

Name of file type, specified as a character vector.

Data Types: char

Output Arguments

expand all

Value of file extension, specified as a character vector.

Data Types: char

Examples

tc = coder.make.ToolchainInfo;
tool = tc.getBuildTool('C Compiler');
blditm = coder.make.BuildItem('CD','.cd')
bldtm = 

	Macro  : CD
	Value : .cd
tool.addFileExtension('SourceX',blditm)
value = tool.getFileExtension('SourceX')
value  = 

.cd
tool.setFileExtension('SourceX','.ef')
value = tool.getFileExtension('SourceX')
value  = 

.ef

Version History

Introduced in R2013a