// SPDX-FileCopyrightText: 2025 The Project Pterodactyl Developers // // SPDX-License-Identifier: MPL-2.0 import Foundation import TSCBasic import llbuild2fx extension LLBDeclFileTree { public static func file(absolutePath: AbsolutePath, contents: String) -> Self { let components = absolutePath.components let leaf = LLBDeclFileTree.file(contents) return components.dropFirst().reversed().reduce(leaf) { tail, name in .directory(files: [name: tail]) } } }