Skip to content
Snippets Groups Projects
Select Git revision
  • a70b54953d80c71ac5e23e94745a0341b8734ccf
  • master default protected
  • fix_Makefile.mingw#2
  • update_Makefile.mingw
  • fix_Makefile.mingw
  • fix_API_for_C_apps
  • fix_procinfo_mac
  • boinccmd_gpu_mode_always_until_sigterm
  • fgrp_osx_hotfix
  • fix_boinc_master@f8250782
  • eah_wrapper_improvements
  • diagnostics_win-hotfix
  • diagnostics_win-hotfix-old
  • current_fgrp_apps
  • testing_gw_apps
  • gw_app_darwin_15
  • current_brp_apps
  • current_brp_apps_android10
  • current_gfx_apps
  • current_server
  • current_gw_apps
  • previous_fgrp_apps
  • previous_gw_apps
  • testing_brp_apps
  • apps_FGRP3_1.07
  • apps_FGRP3_1.08
26 results

graphics2.h

Blame
  • FT_delete_file.m 992 B
    %---------------------------------------------------------------------  
    % function []=FT_delete_file(filename)
    % 
    % deletes a file, USE CAREFULLY!
    %
    % filename: string, contains the name of the file
    %
    % Part of the SimTools package
    % Andreas Freise 16.06.08 afreise@googlemail.com
    %---------------------------------------------------------------------  
    
    function []=FT_delete_file(filename)
      
      baseid='FT_delete_file';
    
      if (~isstr(filename))
        msgid=[baseid,':checkinarg'];
        result='input argument must be a filename';
        error(msgid,result);
      end
      
      % check whether name contains / or \ so its
      % filename including the path
      
      ispath=0;
      if (strfind(filename,'\'))
        ispath=1;
      end
      
      if (strfind(filename,'/'))
        ispath=1;
      end
      
      if (ispath==0)
        filename=['./',filename];
      end
      
      if (exist(filename))
        disp(sprintf('deleting %s',filename));
        delete(filename);
      else
        disp(sprintf('cannot delete %s, file does not exist',filename));
      end