Directory listing

Under window this code will create a imaginary root directory containing all volumes. It is therefor possible to list all files in all volumes.

boolean imagine_path_search(char *file, boolean partial, char *path, boolean folders, uint number, char *out_buffer, uint out_buffer_size);

Description: Searches for a file recursevly in a path, and writes its location to the out_buffer. If "partial" is set the search will also yeild results wher the seacr string only makes up part of the file name.

imagine_path_dir_open

IDir *imagine_path_dir_open(char *path);

Description: Opens a path for traversial. If the path is not legal or not a directry the fuction will return NULL.

imagine_path_dir_next

boolean imagine_path_dir_next(IDir *d, char *file_name_buffer, uint buffer_size);

Description: Writes the name of the next member of the directory to file_name_buffer. Returns FALSE if there are no files left in the directory to write out.

imagine_path_dir_close

void imagine_path_dir_close(IDir *d);

Description: Closes a directory.

imagine_path_is_dir

boolean imagine_path_is_dir(char *path);

Description: Returns True if the path is a valid directory.

imagine_path_file_stats

boolean imagine_path_file_stats(char *path, size_t *size, uint64 *create_time, size_t *modify_time);

Description: Outputs stats about a file.

imagine_path_volume_stats

boolean imagine_path_volume_stats(char *path, size_t *block_size, size_t *free_size, size_t *used_size, size_t *total_size);

Description: Outputs information about a volumes, its block size, and how many block are used and free.

imagine_path_open

FILE *imagine_path_open(char *path, char *mode);

Description: Same as fopen but UTF8.