2.2.4.38.18 Project::GetAttachedFileNames

Description

Gets a list of file names that is attached to the Project folder in Origin-C workspace.

Syntax

int GetAttachedFileNames( StringArray & saNames )

Parameters

saNames
[output]a string<vector> which recieves names of all the attached files

Return

returns the number of files attached

Examples

EX1

void Project_GetAttachedFileNames_ex1()
{
	//Add attached files.
	string strFileNameArray = GetAppPath(true) + "OriginC\\System\\Array.h";
	if ( Project.AttachFile(strFileNameArray) )
		printf("You can see " + strFileNameArray + " is under Project folder!\n");
	else
	{
		printf("Fail to attach file to project!");
		return;
	}
	//Get attached files
	StringArray saName;
	int nRet =Project.GetAttachedFileNames( saName );
	
	printf("Attached files are:\n",nRet);
	for(int ii= 0; ii<saName.GetSize(); ii++)
		printf("%s\n",saName[ii]);	
}

Remark

See Also

Project::AttachFile

Header to Include

origin.h