mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
31 lines
1.0 KiB
C
Executable File
31 lines
1.0 KiB
C
Executable File
/*
|
|
* This file is part of Espruino, a JavaScript interpreter for Microcontrollers
|
|
*
|
|
* Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk>
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*
|
|
* ----------------------------------------------------------------------------
|
|
* Contains built-in functions for SD card access, based on node.js 'fs' module
|
|
* ----------------------------------------------------------------------------
|
|
*/
|
|
#include "jsvar.h"
|
|
|
|
#ifndef LINUX
|
|
#define JS_DIR_BUF_SIZE 64
|
|
#else
|
|
#define JS_DIR_BUF_SIZE 256
|
|
#define FR_OK (0)
|
|
#endif
|
|
|
|
JsVar *jswrap_fs_readdir(JsVar *path);
|
|
bool jswrap_fs_writeOrAppendFile(JsVar *path, JsVar *data, bool append);
|
|
JsVar *jswrap_fs_readFile(JsVar *path);
|
|
bool jswrap_fs_unlink(JsVar *path);
|
|
JsVar *jswrap_fs_stat(JsVar *path);
|
|
bool jswrap_fs_mkdir(JsVar *path);
|
|
void jswrap_fs_sync();
|
|
JsVar *jswrap_fs_getfree(JsVar *path);
|
|
bool jswrap_fs_mkfs(); |