
22. High-level API Reference
372
www.yoctopuce.com
22.6. Files function interface
The filesystem interface makes it possible to store files on some devices, for instance to design a
custom web UI (for networked devices) or to add fonts (on display devices).
In order to use the functions described here, you should include:
js
<script type='text/javascript' src='yocto_files.js'></script>
cpp
#include "yocto_files.h"
m
#import "yocto_files.h"
pas
uses yocto_files;
vb
yocto_files.vb
cs
yocto_files.cs
java
import com.yoctopuce.YoctoAPI.YFiles;
uwp
import com.yoctopuce.YoctoAPI.YFiles;
py
from yocto_files import *
php
require_once('yocto_files.php');
es
in HTML: <script src="../../lib/yocto_files.js"></script>
in node.js: require('yoctolib-es2017/yocto_files.js');
Global functions
yFindFiles(
func
)
Retrieves a filesystem for a given identifier.
yFindFilesInContext(
yctx
,
func
)
Retrieves a filesystem for a given identifier in a YAPI context.
yFirstFiles()
Starts the enumeration of filesystems currently accessible.
yFirstFilesInContext(
yctx
)
Starts the enumeration of filesystems currently accessible.
YFiles
methods
files
→
clearCache()
Invalidates the cache.
files
→
describe()
Returns a short text that describes unambiguously the instance of the filesystem in the form
TYPE(NAME)=SERIAL.FUNCTIONID
.
files
→
download(
pathname
)
Downloads the requested file and returns a binary buffer with its content.
files
→
download_async(
pathname
,
callback
,
context
)
Downloads the requested file and returns a binary buffer with its content.
files
→
fileExist(
filename
)
Test if a file exist on the filesystem of the module.
files
→
format_fs()
Reinitialize the filesystem to its clean, unfragmented, empty state.
files
→
get_advertisedValue()
Returns the current value of the filesystem (no more than 6 characters).
files
→
get_errorMessage()
Returns the error message of the latest error with the filesystem.
files
→
get_errorType()
Содержание Yocto-Display
Страница 1: ...Yocto Display User Manual...
Страница 2: ......
Страница 40: ...34 www yoctopuce com...
Страница 52: ...46 www yoctopuce com...
Страница 84: ...78 www yoctopuce com...
Страница 92: ...86 www yoctopuce com...
Страница 130: ...124 www yoctopuce com...
Страница 158: ...22 High level API Reference 152 www yoctopuce com On failure throws an exception or returns a negative error code...
Страница 422: ...416 www yoctopuce com...
Страница 424: ...24 Characteristics 418 www yoctopuce com...