* fhandler.h (fhandler_base::mkdir): New virtual method.

(fhandler_base::rmdir): Ditto.
(fhandler_disk_file:mkdir): New method.
(fhandler_disk_file:rmdir): Ditto.
* dir.cc (mkdir): Implement with fhandlers.
(rmdir): Ditto.
* fhandler.cc (fhandler_base::mkdir): New virtual method.
(fhandler_base::rmdir): Ditto.
(fhandler_disk_file::mkdir): New method.
(fhandler_disk_file::rmdir): Ditto.

fhandler_random.cc: white space.
This commit is contained in:
Christopher Faylor
2005-05-25 04:32:59 +00:00
parent 2a41ee9e0c
commit 125b724dd8
6 changed files with 161 additions and 98 deletions

View File

@@ -1509,6 +1509,28 @@ fhandler_base::set_nonblocking (int yes)
openflags = (openflags & ~O_NONBLOCK_MASK) | new_flags;
}
int
fhandler_base::mkdir (mode_t)
{
if (exists ())
set_errno (EEXIST);
else
set_errno (EROFS);
return -1;
}
int
fhandler_base::rmdir ()
{
if (!exists ())
set_errno (ENOENT);
else if (!pc.isdir ())
set_errno (ENOTDIR);
else
set_errno (EROFS);
return -1;
}
DIR *
fhandler_base::opendir ()
{