[erlang-patches] Added native OS file system copy to efile

Björn Gustavsson bgustavsson@REDACTED
Thu Oct 7 15:21:38 CEST 2010


We will think more about the first part of your email. Here is the answer
for the second part...

2010/10/6 Blaine Whittle <BWhittle@REDACTED>:
> On semi unrelated note, I'm about to implement a function to quickly verify if a file exists.  At the moment, I'm just using prim_file:read_file_info/1 for this.  The problem is that read_file_info is a little too heavy for this simple check as it collects extra info about the file.  This means that if a file exists, the file existence check takes 2 or 3 times longer than when the file doesn't exist.  For most cases, I'm sure this is fine but when you are doing a few million of checks, it adds up.
>
> If there is any interest in having this as part of the efile API, I can add this function to efile + the posix and win32 implementations (fyi there already is a efile_may_openfile function which is close to what I want, the problem is that it's not exposed to prim_file), otherwise I'll implement a light weight file exists check as a NIF.

I think there is good chance that we may include such an
extension in a future release, provided that your patch is
OTP-worthy. See "Making a patch OTP-worthy" in:

http://github.com/erlang/otp/wiki/Submitting-patches

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB


More information about the erlang-patches mailing list