Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I access the filesystem with Google NaCl?

Since Google NaCl is C++, will I be able to access the file system somehow? That's pretty much needed if I am to create a game or a desktop app.

like image 904
Tower Avatar asked Dec 10 '11 13:12

Tower


2 Answers

Due to security restrictions, NaCl doesn't allow you to just open up any folder on the disk.

It does, however, grant the ability to access a sandboxed, obfuscated filesystem.

You can check out the PONG example in the latest SDK for examples of how to use the FileSystemAPI.

In addition, this page is a good starting point to understanding how the file system works: https://developers.google.com/native-client/beta-docs/fileIO

~Main

like image 177
Colt McAnlis Avatar answered Sep 23 '22 00:09

Colt McAnlis


Yes, but this access is supposedly secure and only able to access a sandboxed file system. Apparently you'll be able to do mmap calls, even. What could go wrong? :-)

Beyond any data files that come with the download, additional disk quota is an "app privilege" you have to "approve" when you install something. It can range from 0 to unlimited.

like image 25
HostileFork says dont trust SE Avatar answered Sep 24 '22 00:09

HostileFork says dont trust SE