X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=blobdiff_plain;f=helm%2FDEVEL%2Flablgtk%2Flablgtk_20000829-0.1.0%2Fapplications%2Fbrowser%2Fuseunix.ml;fp=helm%2FDEVEL%2Flablgtk%2Flablgtk_20000829-0.1.0%2Fapplications%2Fbrowser%2Fuseunix.ml;h=0000000000000000000000000000000000000000;hp=c4860a8cab6ca238d666d593c3d1b49156097eaa;hb=869549224eef6278a48c16ae27dd786376082b38;hpb=89262281b6e83bd2321150f81f1a0583645eb0c8 diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/useunix.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/useunix.ml deleted file mode 100644 index c4860a8ca..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/useunix.ml +++ /dev/null @@ -1,36 +0,0 @@ -(* $Id$ *) - -open Unix - -let get_files_in_directory dir = - try - let dirh = opendir dir in - let rec get_them () = - try - let x = readdir dirh in - x :: get_them () - with - _ -> closedir dirh; [] - in - Sort.list ~order:(<) (get_them ()) - with Unix_error _ -> [] - -let is_directory name = - try - (stat name).st_kind = S_DIR - with _ -> false - -let get_directories_in_files ~path = - List.filter ~pred:(fun x -> is_directory (path ^ "/" ^ x)) - -(************************************************** Subshell call *) -let subshell ~cmd = - let rc = open_process_in ~cmd in - let rec it () = - try - let x = input_line rc in x :: it () - with _ -> [] - in - let answer = it () in - close_process_in rc; - answer