Udostępnij za pośrednictwem


DeleteFile

Usuwa określony plik.

function DeleteFile( 
   oFSO, 
   strFile  
) 

Parametry

  • oFSO
    Obiekt systemu plików.

  • strFile
    Nazwa pliku, które mają zostać usunięte.

Uwagi

Wywołanie tej funkcji, aby usunąć określony plik.

Przykład

// Declare a temporary file.
var strFile = strTempFolder + "\\" + strTarget;
var strClassName = strTarget.split(".");
wizard.AddSymbol("SAFE_CLASS_NAME", strClassName[0]);
wizard.AddSymbol("SAFE_ITEM_NAME", strClassName[0]);

// Declare the template name.
var strTemplate = strTemplatePath + "\\" + strTpl;

// Render and insert the template.
wizard.RenderTemplate(strTemplate, strFile, bCopyOnly);

// Create a new project file and add the file from the template.
var projfile = projItems.AddFromTemplate(strFile, strTarget);

// Delete the temporary file from the file structure object.
DeleteFile(fso, strFile);

Zobacz też

Zadania

Tworzenie kreatora niestandardowych

Koncepcje

Dostosowywanie kreatorów C++ z typowych funkcji języka JScript

Projektowanie Kreatora

Inne zasoby

Funkcje języka JScript dla kreatorów C++