DirectoryEntry.h 587 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (c) 2023, Sam Atkins <atkinssj@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/DeprecatedString.h>
  8. struct dirent;
  9. namespace Core {
  10. struct DirectoryEntry {
  11. enum class Type {
  12. BlockDevice,
  13. CharacterDevice,
  14. Directory,
  15. File,
  16. NamedPipe,
  17. Socket,
  18. SymbolicLink,
  19. Unknown,
  20. Whiteout,
  21. };
  22. Type type;
  23. // FIXME: Once we have a special Path string class, use that.
  24. DeprecatedString name;
  25. static DirectoryEntry from_dirent(dirent const&);
  26. };
  27. }