DeleteFile Function
Local string &sReturnValue;
Local File &RQST_FILE1 = GetFile(&FilePath | &sFileName, "W", %FilePath_Absolute);
Local number &retcode;
Local JavaObject &oDelFile;
&FNAMES = FindFiles(&FilePath | &sFileName, %FilePath_Absolute);
If &FNAMES.Len > 0 Then
MessageBox(0, "", 0, 0, "fileExists " | &FNAMES [1]);
If All(&RQST_FILE1) Then
&oDelFile = CreateJavaObject("java.io.File", &FilePath | &sFileName);
&sFileName1 = &oDelFile.getName();
&nFilelength1 = &oDelFile.length();
MessageBox(0, "", 0, 0, "&sFileName1 " | &sFileName1);
MessageBox(0, "", 0, 0, "&nFilelength1 " | &nFilelength1);
&oDelFile.delete();
Return "DELETED";
End-If;
End-If;
Return " ";
End-Function;
No comments:
Post a Comment