1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright (C) 2015 Intel Corporation. 3 * All rights reserved. 4 */ 5 6 /** \file 7 * OS filesystem utility functions 8 */ 9 10 #ifndef SPDK_FD_H 11 #define SPDK_FD_H 12 13 #include "spdk/stdinc.h" 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 /** 20 * Get the file size. 21 * 22 * \param fd File descriptor. 23 * 24 * \return File size. 25 */ 26 uint64_t spdk_fd_get_size(int fd); 27 28 /** 29 * Get the block size of the file. 30 * 31 * \param fd File descriptor. 32 * 33 * \return Block size. 34 */ 35 uint32_t spdk_fd_get_blocklen(int fd); 36 37 #ifdef __cplusplus 38 } 39 #endif 40 41 #endif 42