summaryrefslogtreecommitdiff
path: root/src/Scilab2C/GeneralFunctions/SCI2Cmdelete.sci
diff options
context:
space:
mode:
authorpmarecha2008-06-05 08:49:05 +0000
committerpmarecha2008-06-05 08:49:05 +0000
commit42659d6cdbe63972aea27baf0289db8fcc1310fa (patch)
tree05cc1eb42b985cf657be112ae5a2e842a13c2126 /src/Scilab2C/GeneralFunctions/SCI2Cmdelete.sci
parentc4ca26eb9d2bbe224e41fc40658279cb865c48fc (diff)
downloadscilab2c-42659d6cdbe63972aea27baf0289db8fcc1310fa.tar.gz
scilab2c-42659d6cdbe63972aea27baf0289db8fcc1310fa.tar.bz2
scilab2c-42659d6cdbe63972aea27baf0289db8fcc1310fa.zip
SVN is not FTP !
Diffstat (limited to 'src/Scilab2C/GeneralFunctions/SCI2Cmdelete.sci')
-rw-r--r--src/Scilab2C/GeneralFunctions/SCI2Cmdelete.sci21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Scilab2C/GeneralFunctions/SCI2Cmdelete.sci b/src/Scilab2C/GeneralFunctions/SCI2Cmdelete.sci
new file mode 100644
index 00000000..772cff98
--- /dev/null
+++ b/src/Scilab2C/GeneralFunctions/SCI2Cmdelete.sci
@@ -0,0 +1,21 @@
+function SCI2Cmdelete(InFile);
+// function SCI2Cmdelete(InFile);
+// -----------------------------------------------------------------
+// Deletes the input files only if the file really exists.
+// This avoids the issuing of the error generated by mdelete.
+//
+// Input data:
+// InFile: full path of the file to be deleted.
+//
+// Output data:
+//
+// Status:
+// 12-Apr-2007 -- Nutricato Raffaele: Author.
+// -----------------------------------------------------------------
+
+[Inx,Inierr]=fileinfo(InFile)
+if Inierr == 0
+ mdelete(InFile);
+end
+
+endfunction