libbe_build: Synchronize Directory.cpp with the main one.

The set_dir_fd code appears to be libbe_build specific, so that
and accompanying logic is preserved.
This commit is contained in:
Augustin Cavalier
2021-11-18 12:13:47 -05:00
parent 28c8a16a5a
commit ec21dc91b1
2 changed files with 283 additions and 654 deletions
+14 -30
View File
@@ -1,15 +1,11 @@
//----------------------------------------------------------------------
// This software is part of the Haiku distribution and is covered
// by the MIT License.
//---------------------------------------------------------------------
/*!
\file Directory.h
BDirectory interface declaration.
*/
/*
* Copyright 2002-2006, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _DIRECTORY_H
#define _DIRECTORY_H
#include <Node.h>
#include <EntryList.h>
#include <StorageDefs.h>
@@ -17,20 +13,11 @@
class BFile;
class BSymLink;
struct stat_beos;
/*!
\class BDirectory
\brief A directory in the filesystem
Provides an interface for manipulating directories and their contents.
\author <a href='mailto:[email protected]'>Ingo Weinhold</a>
\author <a href="mailto:[email protected]">Tyler Dauwalder</a>
\version 0.0.0
*/
class BDirectory : public BNode, public BEntryList {
public:
public:
BDirectory();
BDirectory(const BDirectory &dir);
BDirectory(const entry_ref *ref);
@@ -49,6 +36,8 @@ public:
status_t GetEntry(BEntry *entry) const;
bool IsRootDirectory() const;
status_t FindEntry(const char *path, BEntry *entry,
bool traverse = false) const;
@@ -72,8 +61,10 @@ public:
BDirectory &operator=(const BDirectory &dir);
private:
private:
friend class BNode;
friend class BEntry;
friend class BFile;
virtual void _ErectorDirectory1();
virtual void _ErectorDirectory2();
@@ -82,25 +73,18 @@ private:
virtual void _ErectorDirectory5();
virtual void _ErectorDirectory6();
private:
private:
virtual void close_fd();
int get_fd() const;
status_t set_dir_fd(int fd);
private:
private:
uint32 _reservedData[7];
int fDirFd;
node_ref fDirNodeRef;
friend class BEntry;
friend class BFile;
};
// C functions
status_t create_directory(const char *path, mode_t mode);
#endif // _DIRECTORY_H
File diff suppressed because it is too large Load Diff