synfig-core
1.0.3
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
synfig
filesystemnative.h
Go to the documentation of this file.
1
/* === S Y N F I G ========================================================= */
21
/* ========================================================================= */
22
23
/* === S T A R T =========================================================== */
24
25
#ifndef __SYNFIG_FILESYSTEMNATIVE_H
26
#define __SYNFIG_FILESYSTEMNATIVE_H
27
28
/* === H E A D E R S ======================================================= */
29
30
#include "
filesystem.h
"
31
32
/* === M A C R O S ========================================================= */
33
34
/* === T Y P E D E F S ===================================================== */
35
36
/* === C L A S S E S & S T R U C T S ======================================= */
37
38
namespace
synfig
39
{
40
41
class
FileSystemNative
:
public
FileSystem
42
{
43
public
:
44
class
ReadStream
:
public
FileSystem::ReadStream
45
{
46
protected
:
47
friend
class
FileSystemNative
;
48
FILE *
file_
;
49
ReadStream
(
Handle
file_system
, FILE *file);
50
virtual
size_t
internal_read
(
void
*buffer,
size_t
size);
51
public
:
52
virtual
~ReadStream
();
53
};
54
55
class
WriteStream
:
public
FileSystem::WriteStream
56
{
57
protected
:
58
friend
class
FileSystemNative
;
59
FILE *
file_
;
60
WriteStream
(
Handle
file_system
, FILE *
file_
);
61
virtual
size_t
internal_write
(
const
void
*buffer,
size_t
size);
62
public
:
63
virtual
~WriteStream
();
64
};
65
66
private
:
67
static
const
etl::handle< FileSystemNative > instance__;
68
FileSystemNative
();
69
70
public
:
71
static
const
etl::handle< FileSystemNative >&
instance
()
72
{
return
instance__; }
73
74
virtual
~FileSystemNative
();
75
76
virtual
bool
is_file
(
const
std::string
&filename);
77
virtual
bool
is_directory
(
const
std::string
&filename);
78
79
virtual
bool
directory_create
(
const
std::string
&dirname);
80
81
virtual
bool
file_remove
(
const
std::string
&filename);
82
virtual
bool
file_rename
(
const
std::string
&from_filename,
const
std::string
&to_filename);
83
virtual
ReadStreamHandle
get_read_stream
(
const
std::string
&filename);
84
virtual
WriteStreamHandle
get_write_stream
(
const
std::string
&filename);
85
};
86
87
}
88
89
/* === E N D =============================================================== */
90
91
#endif
Generated on Mon Nov 16 2015 15:33:40 for synfig-core by
1.8.1.2