mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
93ef955597
This will be used later on by other userspace programs that need it.
35 lines
673 B
C++
35 lines
673 B
C++
/*
|
|
* Copyright (c) 2023, Sam Atkins <atkinssj@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/DeprecatedString.h>
|
|
#include <dirent.h>
|
|
|
|
namespace Core {
|
|
|
|
struct DirectoryEntry {
|
|
enum class Type {
|
|
BlockDevice,
|
|
CharacterDevice,
|
|
Directory,
|
|
File,
|
|
NamedPipe,
|
|
Socket,
|
|
SymbolicLink,
|
|
Unknown,
|
|
Whiteout,
|
|
};
|
|
Type type;
|
|
// FIXME: Once we have a special Path string class, use that.
|
|
DeprecatedString name;
|
|
ino_t inode_number;
|
|
|
|
static DirectoryEntry from_dirent(dirent const&);
|
|
static DirectoryEntry from_stat(DIR*, dirent const&);
|
|
};
|
|
|
|
}
|