-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathBlueFileStream_Blue.cpp
More file actions
47 lines (39 loc) · 1.14 KB
/
Copy pathBlueFileStream_Blue.cpp
File metadata and controls
47 lines (39 loc) · 1.14 KB
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
// Copyright © 2011 CCP ehf.
#include "StdAfx.h"
#include "BlueFileStream.h"
#include "IBlueOS.h"
BLUE_DEFINE( BlueFileStream );
const Be::ClassInfo* BlueFileStream::ExposeToBlue()
{
EXPOSURE_BEGIN( BlueFileStream, "" )
MAP_INTERFACE( IBlueStream )
MAP_METHOD_AND_WRAP
(
"ReadEntireFile",
ReadEntireFile,
"Reads the entire contents of the given file. The file operations are atomic,\n"
"meaning that other processes will not change the contents of the file while\n"
"is being read.\n"
":param filename: path to the file\n"
":raises RuntimeError: on error"
)
MAP_METHOD_AND_WRAP
(
"ReadEntireFileWithYield",
ReadEntireFileWithYield,
"Reads the entire contents of the given file. The file operations are\n"
"done on a background thread and the calling tasklet yields until it\n"
"is done. The file operations are atomic,\n"
"meaning that other processes will not change the contents of the file while\n"
"is being read.\n"
":param filename: path to the file\n"
":raises RuntimeError: on error"
)
MAP_METHOD_AND_WRAP
(
"close",
Close,
"Close the file stream."
)
EXPOSURE_END()
}