joyent / libuv

Go to
https://github.com/libuv/libuv
3.27k stars 653 forks source link

unix,win: add uv_fs_access() #1511

Closed cjihrig closed 10 years ago

cjihrig commented 10 years ago

@saghul here is the uv_fs_access() PR you asked for. The Unix side seems to be working, but on the Windows side, GetFileAttributesW() is always returning INVALID_FILE_ATTRIBUTES. Suggestions are more than welcome.

saghul commented 10 years ago

Thanks Colin! I'll check it asap (I'm moving these days and my Windows gear is in a box somewhere...)

cjihrig commented 10 years ago

@saghul addressed the previous round of comments and got it working on Windows.

saghul commented 10 years ago

Good work Chris! Looks solid. I'll merge once after running it for a spin on Windows. Did you look into what @piscisaureus said about GetFileAttributesW? At any rate, it can be improved at a later stage since it's an implementation detail.

cjihrig commented 10 years ago

@saghul removed the braces. I didn't look into opening and closing the file, as their seemed to be a potential issue if the file was locked by another process. Linking to the node PR for future reference.

saghul commented 10 years ago

Cheers, Colin! Landed in c18205a.

cjihrig commented 10 years ago

Awesome. Thanks for the help @saghul. @trevnorris I'm sure you'll get an email about this, but you asked me to let you know when this landed.