Go to the source code of this file.
Detailed Description
Function Documentation
- Parameters:
-
file | a file to test |
test | bitfield of GFileTest flags |
This is the AND version of g_file_test(). That is, all file tests specified in the test bits have to succed for this function to return TRUE. This function is implemented via birnet_file_check(), which allowes for more detailed mode tests and is recommended over use of this function. Here is the list of possible GFileTest flags:
G_FILE_TEST_IS_REGULAR
- test for a recular file
G_FILE_TEST_IS_SYMLINK
- test for a symlink
G_FILE_TEST_IS_DIR
- test for a directory
G_FILE_TEST_IS_EXECUTABLE
- test for an executable
G_FILE_TEST_EXISTS
- test whether the file exists
- Parameters:
-
self | valid SfiFileCrawler |
pattern_paths | colon (semicolon under win32) seperated search path |
file_pattern | wildcard pattern for file names |
- Returns:
- a singly linked list with newly allocated strings
This function takes a search path (possibly containing wildcards) and adds them to the file crawlers search list. If file_pattern is non NULL, it is appended to each directory element extracted from pattern_paths, before attempting file system searches. sfi_file_crawler_needs_crawl() may return TRUE after calling this function.
- Parameters:
-
By default, results returned by self are only tested for existence. If additional file tests have to be met by the results, they can be set by this function.
- Parameters:
-
Collect the next file or directory if possible, new results need not arrive after calling this function, and more than one may. This function does nothing if sfi_file_crawler_needs_crawl() returns FALSE.
- Parameters:
-
Destroy an existing file crawler and free any resources allocated by it.
- Parameters:
-
search_path | colon (semicolon under win32) seperated search path with '?' and '*' wildcards |
file_pattern | wildcard pattern for file names |
cwd | assumed current working directoy (to interpret './' in search_path) |
file_test | GFileTest file test condition (e.g. G_FILE_TEST_IS_REGULAR) or 0 |
- Returns:
- an SfiRing with newly allocated strings
Given a search path with wildcards, list all files matching file_pattern, contained in the directories which the search path matches. Files that do not pass file_test are not listed.
- Parameters:
-
Figure whether collecting all matching files has finished now. If not, sfi_file_crawler_crawl() needs to be called until this function returns FALSE.
- Parameters:
-
self | valid SfiFileCrawler RETURNS: newly allocated string containig resulting filename |
Fetch next result if any or NULL.
- Parameters:
-
Set the path to be assumed the current working directory.
- Parameters:
-
filename | possibly relative filename |
parentdir | possibly relative parent directory path |
- Returns:
- a newly allocated absolute pathname
Construct an absolute filename from filename, using parentdir as parent directory if filename is not absolute. If parentdir is not absolute, it is assumed to be current directory relative. An exception are filenames starting out with '~' and '~USER', these are interpreted to refer to '/home' or '/home/USER' respectively.