static int be_file_open(prop_t *page, const char *url) { struct fa_stat fs; char errbuf[200]; if(fa_stat(url, &fs, errbuf, sizeof(errbuf))) return nav_open_error(page, errbuf); return fs.fs_type == CONTENT_DIR ? file_open_dir(page, url) : file_open_file(page, url, &fs); }
static int be_file_open(prop_t *page, const char *url, int sync) { struct fa_stat fs; char errbuf[200]; if(fa_stat(url, &fs, errbuf, sizeof(errbuf))) { nav_open_error(page, errbuf); } else if(fs.fs_type == CONTENT_DIR) { file_open_dir(page, url, fs.fs_mtime); } else { file_open_file(page, url, &fs); } return 0; }