Implement creating a new directory.

This commit is contained in:
Andreas Kling 2018-10-16 00:35:03 +02:00
parent 5c50d02c2e
commit f608629704
Notes: sideshowbarker 2024-07-19 18:47:48 +09:00
9 changed files with 224 additions and 20 deletions

View file

@ -337,7 +337,14 @@ OwnPtr<FileHandle> VirtualFileSystem::open(const String& path)
OwnPtr<FileHandle> VirtualFileSystem::create(const String& path)
{
// FIXME: Do the real thing, not just this fake thing!
m_rootNode->fileSystem()->createInode(m_rootNode->fileSystem()->rootInode(), "empty", 0100644);
m_rootNode->fileSystem()->createInode(m_rootNode->fileSystem()->rootInode(), "empty", 0100644, 0);
return nullptr;
}
OwnPtr<FileHandle> VirtualFileSystem::mkdir(const String& path)
{
// FIXME: Do the real thing, not just this fake thing!
m_rootNode->fileSystem()->makeDirectory(m_rootNode->fileSystem()->rootInode(), "mydir", 0400755);
return nullptr;
}