summaryrefslogtreecommitdiffstats
path: root/contrib/restricted/wavm/Include/WAVM/Platform/File.h
blob: 779bac4f28e23bbdf13e8e23f49fa3a4a1097461 (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
#pragma once

#include <string>
#include "WAVM/Inline/BasicTypes.h"
#include "WAVM/Platform/Defines.h"
#include "WAVM/VFS/VFS.h"

namespace WAVM { namespace Platform {

	enum class StdDevice
	{
		in,
		out,
		err,
	};

	WAVM_API VFS::VFD* getStdFD(StdDevice device);
	WAVM_API std::string getCurrentWorkingDirectory();

	struct HostFS : VFS::FileSystem
	{
		// HostFS is intended to be a singleton, so prevent users from deleting it.
	protected:
		virtual ~HostFS() override {}
	};
	WAVM_API HostFS& getHostFS();
}}