summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/zippath.h
blob: 12c7546ae9a9762db84f6e0844b588ab203cd045 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/***************************************************************************

    zippath.h

    File/directory/path operations that work with ZIP files

***************************************************************************/

#pragma once

#ifndef __ZIPPATH_H__
#define __ZIPPATH_H__

#include "corefile.h"
#include "astring.h"
#include "unzip.h"


/***************************************************************************
    TYPE DEFINITIONS
***************************************************************************/

class zippath_directory;



/***************************************************************************
    FUNCTION PROTOTYPES
***************************************************************************/

/* ----- path operations ----- */

/* retrieves the parent directory */
astring &zippath_parent(astring &dst, const char *path);

/* retrieves the parent directory basename */
astring &zippath_parent_basename(astring &dst, const char *path);

/* combines two paths */
astring &zippath_combine(astring &dst, const char *path1, const char *path2);


/* ----- file operations ----- */

/* opens a zip path file */
file_error zippath_fopen(const char *filename, UINT32 openflags, core_file *&file, astring &revised_path);


/* ----- directory operations ----- */

/* opens a directory */
file_error zippath_opendir(const char *path, zippath_directory **directory);

/* closes a directory */
void zippath_closedir(zippath_directory *directory);

/* reads a directory entry */
const osd_directory_entry *zippath_readdir(zippath_directory *directory);

/* returns TRUE if this path is a ZIP path or FALSE if not */
int zippath_is_zip(zippath_directory *directory);



#endif /* __ZIPPATH_H__ */