File_DeleteDir(pDirName), Bit
pDirName: Name of the directory to delete (maximum length 8 characters).
Return Status:
1: Directory deleted successfully.
0: Read/write error.
Delete Directory
This procedure deletes a directory with the specified name. The directory name can be a string with a maximum length of 8 characters.
Example:
File_DeleteDir("NewFolder")
TftSetUp(0) 'Set screen TftResetScreen(BLACK) 'Reset screen TftSetSndFont(0,0) 'Set Font0 While File_Init() <> cErrOK : Wend 'Initialize SD Card TftPrintSndString("Sd Initialization OK",1,0,0,1,GREEN,BLACK,0) 'Confirm Initialize SD Card If File_DeleteDir("stop") = 1 Then TftPrintSndString("Delete stop OK",1,0,2,1,GREEN,BLACK,0) 'stop folder deleted (expected) Else TftPrintSndString("Delete stop NO",1,0,2,1,GREEN,BLACK,0) 'stop folder not deleted EndIf If File_DeleteDir("start") = 1 Then TftPrintSndString("Delete start OK",1,0,3,1,GREEN,BLACK,0) 'start folder deleted Else TftPrintSndString("Delete start NO",1,0,3,1,GREEN,BLACK,0) 'start folder not deleted (expected) EndIf If File_DeleteFile("gif.txt") = 1 Then TftPrintSndString("Delete gif.txt OK",1,0,4,1,GREEN,BLACK,0) 'gif.txt deleted (expected) Else TftPrintSndString("Delete gif.txt NO",1,0,4,1,GREEN,BLACK,0) 'gif.txt not deleted EndIf If File_DeleteFile("test.log") = 1 Then TftPrintSndString("Delete test.Log OK",1,0,5,1,GREEN,BLACK,0) 'test.Log deleted Else TftPrintSndString("Delete test.Log NO",1,0,5,1,GREEN,BLACK,0) 'test.Log not deleted (expected) EndIf |
|
Created with the Personal Edition of HelpNDoc: What is a Help Authoring tool?