File tree Expand file tree Collapse file tree 1 file changed +0
-56
lines changed Expand file tree Collapse file tree 1 file changed +0
-56
lines changed Original file line number Diff line number Diff line change @@ -773,61 +773,5 @@ function dtutils_file.rmdir(path)
773
773
return dsys .external_command (rm_cmd .. " " .. path )
774
774
end
775
775
776
- function dtutils_file .is_dir (path )
777
- local cmd = nil
778
-
779
- if dt .configuration .running_os == " windows" then
780
- cmd = " if exist " .. ds .sanitize (path .. " \\ *" )
781
- else
782
- cmd = " test -d " .. ds .sanitize (path )
783
- end
784
-
785
- return os.execute (cmd )
786
- end
787
-
788
- function dtutils_file .is_file (path )
789
- local cmd = nil
790
-
791
- if dt .configuration .running_os == " windows" then
792
- if not dtutils_file .is_dir (path ) then
793
- cmd = " if exist " .. ds .sanitize (path )
794
- else
795
- return nil
796
- end
797
- else
798
- cmd = " test -f " .. ds .sanitize (path )
799
- end
800
-
801
- return os.execute (cmd )
802
- end
803
-
804
- local function is_windows_executable (path )
805
- local result = nil
806
-
807
- if (string.match (path , " .exe$" ) or string.match (path , " .EXE$" )) or
808
- (string.match (path , " .com$" ) or string.match (path , " .COM$" )) or
809
- (string.match (path , " .bat$" ) or string.match (path , " .BAT$" )) or
810
- (string.match (path , " .cmd$" ) or string.match (path , " .CMD$" )) then
811
- result = true
812
- end
813
- return result
814
- end
815
-
816
-
817
- function dtutils_file .is_executable (path )
818
-
819
- local result = nil
820
-
821
- if dt .configuration .running_os == " windows" then
822
- if _is_windows_executable (path ) then
823
- result = true
824
- end
825
- else
826
- result = os.execute (" test -x " .. ds .sanitize (path ))
827
- end
828
- return result
829
- end
830
-
831
-
832
776
return dtutils_file
833
777
You can’t perform that action at this time.
0 commit comments