/** * @typedef {import("@awo00/smb2/dist/client/Tree").default} Tree */ module.exports = { /** * Retrieves the specified tree from the session. * @param {Session} session - The session object. * @param {string} tree_name - The name of the tree to retrieve. * @returns {Promise} The retrieved tree. */ async getTree(session, tree_name) { if (!session.trees[tree_name.toLowerCase()]) { session.trees[tree_name.toLowerCase()] = await session.connectTree(tree_name); } return session.trees[tree_name.toLowerCase()] } };