/** * @file test_read.c * @brief read テスト * @author Nomura Kei * @copyright 2008 Nomura Kei */ #include <stdio.h> #include <test_read.h> /** * 指定されたパスが読込可能か確認します。 * * @param pathname パス * @return true/false (読込可能/読込不可) */ bool can_read(const char* pathname) { bool is_success = false; FILE* fp = fopen(pathname, "r"); if (fp != NULL) { is_success = true; fclose(fp); } return is_success; }