[Win32utils-devel] File.open on a directory?

win32utils-devel at rubyforge.org win32utils-devel at rubyforge.org
Thu Nov 11 10:45:55 EST 2004


> -----Original Message-----
> From: win32utils-devel-bounces at rubyforge.org 
> [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of 
> win32utils-devel at rubyforge.org
> Sent: Thursday, November 11, 2004 12:50 AM
> To: win32utils-devel at rubyforge.org
> Subject: Re:[Win32utils-devel] File.open on a directory?
<snip>
> > 
> The open function cannot open directory on Windows. it 
> returns EACCES if given path is directory.
> 
> You should use CreateFile function to open directory.
> Opening a directory with CreateFile requires the 
> FILE_FLAG_BACKUP_SEMANTICS flag.

Time for the 'dopen' class method. :)

Dan



More information about the win32utils-devel mailing list