Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
sfifilecrawler.hh
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 #ifndef __SFI_FILE_CRAWLER_H__
3 #define __SFI_FILE_CRAWLER_H__
4 
5 #include <sfi/sfitypes.hh>
6 #include <sfi/sfiring.hh>
7 
8 typedef struct {
9  SfiRing *results; /* end user results */
10  /*< private >*/
11  gchar *cwd;
12  SfiRing *dpatterns; /* gchar*, directory patterns */
13  GFileTest ptest;
14  /* path crawler */
15  SfiRing *pdqueue; /* dir segments of current search dir */
16  GFileTest stest; /* final segment file test */
17  SfiRing *dlist; /* dir list */
18  /* dir crawler */
19  gpointer dhandle;
20  GPatternSpec *pspec; /* file pattern */
21  gchar *base_dir;
22  GFileTest ftest;
23  SfiRing *accu; /* readdir result */
25 
29  const gchar *cwd);
31  const gchar *pattern_paths,
32  const gchar *file_pattern);
34  GFileTest tests);
38 
39 SfiRing* sfi_file_crawler_list_files (const gchar *search_path,
40  const gchar *file_pattern,
41  GFileTest file_test);
42 
43 gchar* sfi_path_get_filename (const gchar *filename,
44  const gchar *parentdir);
45 void sfi_make_dirpath (const gchar *dir);
46 void sfi_make_dirname_path (const gchar *filename);
47 
48 /* --- file tests --- */
49 gboolean g_file_test_all (const gchar *filename,
50  GFileTest test);
51 
52 
53 /* --- implementations --- */
54 void _sfi_init_file_crawler (void);
55 
56 #endif /* __SFI_FILE_CRAWLER_H__ */
57 
58 /* vim:set ts=8 sts=2 sw=2: */
void sfi_file_crawler_destroy(SfiFileCrawler *self)
Definition: sfifilecrawler.cc:421
Definition: sfifilecrawler.hh:8
gboolean g_file_test_all(const gchar *filename, GFileTest test)
Definition: sfifilecrawler.cc:570
void sfi_file_crawler_crawl(SfiFileCrawler *self)
Definition: sfifilecrawler.cc:396
void sfi_file_crawler_add_search_path(SfiFileCrawler *self, const gchar *pattern_paths, const gchar *file_pattern)
Definition: sfifilecrawler.cc:116
void sfi_file_crawler_set_cwd(SfiFileCrawler *self, const gchar *cwd)
Definition: sfifilecrawler.cc:74
gboolean sfi_file_crawler_needs_crawl(SfiFileCrawler *self)
Definition: sfifilecrawler.cc:377
gchar * sfi_file_crawler_pop(SfiFileCrawler *self)
Definition: sfifilecrawler.cc:61
String cwd()
gchar * sfi_path_get_filename(const gchar *filename, const gchar *parentdir)
Definition: sfifilecrawler.cc:532
Definition: sfiring.hh:21
void sfi_file_crawler_add_tests(SfiFileCrawler *self, GFileTest tests)
Definition: sfifilecrawler.cc:93
SfiRing * sfi_file_crawler_list_files(const gchar *search_path, const gchar *file_pattern, GFileTest file_test)
Definition: sfifilecrawler.cc:449
SfiFileCrawler * sfi_file_crawler_new(void)
Create a new file crawler.
Definition: sfifilecrawler.cc:46