X-Git-Url: https://git.octo.it/?p=collection4.git;a=blobdiff_plain;f=src%2Ffilesystem.h;h=fc2165fd9a5dfeeab098c315d6a4bdb4e5e81d2d;hp=9569bc3d337b0d1abf2674762efd34542c8621b3;hb=e3fb09073a64cc051c11c4a1bdcec493f937b764;hpb=2c85f876c1b9d5c161694cfb03cf20773b74c844 diff --git a/src/filesystem.h b/src/filesystem.h index 9569bc3..fc2165f 100644 --- a/src/filesystem.h +++ b/src/filesystem.h @@ -1,3 +1,26 @@ +/** + * collection4 - filesystem.h + * Copyright (C) 2010 Florian octo Forster + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA + * + * Authors: + * Florian octo Forster + **/ + #ifndef FILESYSTEM_G #define FILESYSTEM_G 1 @@ -7,6 +30,13 @@ typedef int (*fs_ident_cb_t) (const graph_ident_t *ident, void *user_data); +int fs_foreach_dir (const char *base_dir, + int (*callback) (const char *base_dir, const char *entry, void *), + void *user_data); +int fs_foreach_file (const char *base_dir, + int (*callback) (const char *base_dir, const char *entry, void *), + void *user_data); + int fs_scan (fs_ident_cb_t callback, void *user_data); #endif /* FILESYSTEM_G */