Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /smlnj-lib/branches/rt-transition/Unix/unix-path.sml
ViewVC logotype

Diff of /smlnj-lib/branches/rt-transition/Unix/unix-path.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2980, Sat Apr 12 15:01:15 2008 UTC revision 2981, Sat Apr 12 15:56:39 2008 UTC
# Line 26  Line 26 
26            end (* getPath *)            end (* getPath *)
27    
28      local      local
29    (* Workaround for new runtime until we have the Posix APIs implemented *)
30          structure FS = OS.FileSys
31          fun isFileTy (path, F_REGULAR) = not(FS.isDir orelse FS.isLink)
32            | isFileTy (path, F_DIR) = FS.isDir path
33            | isFileTy (path, F_SYMLINK) = FS.isLink path
34            | isFileTy (path, _) = raise Fail "unimplemented"
35    (*
36        structure ST = Posix.FileSys.ST        structure ST = Posix.FileSys.ST
37        fun isFileTy (path, ty) = let        fun isFileTy (path, ty) = let
38              val st = Posix.FileSys.stat path              val st = Posix.FileSys.stat path
# Line 39  Line 46 
46                  | F_BLK => ST.isBlk st                  | F_BLK => ST.isBlk st
47                (* end case *)                (* end case *)
48              end              end
49    *)
50        fun access mode pathname = (OS.FileSys.access(pathname, mode))        fun access mode pathname = (OS.FileSys.access(pathname, mode))
51        fun accessAndType (mode, ftype) pathname = (        fun accessAndType (mode, ftype) pathname = (
52              OS.FileSys.access(pathname, mode)              OS.FileSys.access(pathname, mode)

Legend:
Removed from v.2980  
changed lines
  Added in v.2981

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0