Project::RemoveAttachedFile

Description

Removes a file from the Project folder in Origin-C workspace.

Syntax

BOOL RemoveAttachedFile( LPCSTR lpcszName )

Parameters

lpcszName
[input]name of the file to be removed.

Return

returns zero (FALSE) if failed to find remove file else non-zero

Examples

EX1

void Project_RemoveAttachedFile_EX()
{
   //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;
    }
    
    string strFileName = "Array.h";
    if(Project.RemoveAttachedFile(strFileName)) //Remove all attached files      
        out_str("Remove attached files "+strFileName+" success!");
}

Remark

See Also

Project::RemoveAllAttachedFiles

Header to Include

origin.h