blob: c2de666dcdb71833dc7c2f7910d2ed14df0c42e1 [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SRC_LEDGER_BIN_FILESYSTEM_GET_DIRECTORY_CONTENT_SIZE_H_
#define SRC_LEDGER_BIN_FILESYSTEM_GET_DIRECTORY_CONTENT_SIZE_H_
#include "src/ledger/bin/filesystem/detached_path.h"
namespace ledger {
// Recursively compute the full size of the directory. If a directory (top-level
// |directory| or any of the nested ones) contents can't be retrieved or the
// size of any of the non-directory entries can't be obtained, this will return
// false and post an error in the log. Otherwise, |size| will contain the
// accumulated size in bytes.
bool GetDirectoryContentSize(DetachedPath directory, uint64_t* size);
} // namespace ledger
#endif // SRC_LEDGER_BIN_FILESYSTEM_GET_DIRECTORY_CONTENT_SIZE_H_