blob: ce40c87ba8da4359b44ae06472f6e01fbdc73cd6 (
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
66
67
|
// license:BSD-3-Clause
// copyright-holders:Nathan Woods
/***************************************************************************
zippath.h
File/directory/path operations that work with ZIP files
***************************************************************************/
#pragma once
#ifndef __ZIPPATH_H__
#define __ZIPPATH_H__
#include "corefile.h"
#include <string>
#include "unzip.h"
/***************************************************************************
TYPE DEFINITIONS
***************************************************************************/
class zippath_directory;
/***************************************************************************
FUNCTION PROTOTYPES
***************************************************************************/
/* ----- path operations ----- */
/* retrieves the parent directory */
std::string &zippath_parent(std::string &dst, const char *path);
/* retrieves the parent directory basename */
std::string &zippath_parent_basename(std::string &dst, const char *path);
/* combines two paths */
std::string &zippath_combine(std::string &dst, const char *path1, const char *path2);
/* ----- file operations ----- */
/* opens a zip path file */
file_error zippath_fopen(const char *filename, UINT32 openflags, util::core_file::ptr &file, std::string &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__ */
|