Branch: Tag:

2018-02-09

2018-02-09 18:34:48 by Martin Nilsson <nilsson@fastmail.com>

Put cp() in the global scope, as rm() and mv() are already there.

1820:   //! @seealso   //! @[RandomSystem()->random_string()], @[random()]    + //! @decl int cp(string from, string to) + //! + //! Copies the file @[from] to the new position @[to]. This is an + //! alias for @[Stdio.cp]. +    /* Note that create is called before add_precompiled_program    */   protected void create()
1861:    CO(remove_call_out);    CO(call_out_info);    +  add_constant("cp", lambda(string from, string to) +  { +  function(string,string:int) f = resolv("Stdio.cp"); +  add_constant("cp",f); +  return f(from, to); +  }); +    #if "#share_prefix#"[0]!='#'    // add path for architecture-independant files    add_include_path("#share_prefix#/include");