
os_file_name(?InternalName, ?ExternalName)

   Conversion between internal ECLiPSe file name and Operating
System file name syntax.



Arguments
   InternalName        String, atom or variable.
   ExternalName        String, atom or variable.

Type
   Operating System

Description
   This predicate converts between internal (ECLiPSe) and external
   (operating system) file names. It works in both directions. 


   




Modes and Determinism
   os_file_name(+, -) is det
   os_file_name(-, +) is det

Exceptions
     4 --- Neither InternalName nor ExternalName are instantiated.
     5 --- InternalName or ExternalName are instantiated to something other than string or atom.
     5 --- InternalName or ExternalName are instantiated to different types.

Examples
   
Success:
    On UNIX:
      [eclipse]: os_file_name("//a/b/c.def", OS).
      OS = "//a/b/c.def"
      yes

    On Windows:
      [eclipse]: os_file_name("//a/b/c.def", OS), write(OS).
      a:\b\c.def
      OS = "a:\\b\\c.def"
      yes

      [eclipse]: os_file_name(File, "a:\\b\\c.def").
      File = "//a/b/c.def"
      yes

Error:
      os_file_name(X, Y).                          (Error 4).
      os_file_name(4, X).                          (Error 5).
      os_file_name("/home/file", '/home/file').    (Error 5).





See Also
   existing_file / 4, pathname / 4
