diff --git a/README.md b/README.md index 89c5e48..bea6bbe 100644 --- a/README.md +++ b/README.md @@ -185,6 +185,17 @@ Function returns the weather data in the `on_weather_result(result)` callback, w * `wind_speed` - wind speed; * `wind_direction` - wind direction. +# Cloud + +* `cloud:get_metadata(path)` - returns a table with file metadata; +* `cloud:get_file(path)` - returns the contents of the file; +* `cloud:put_file(sting, path)` - writes a string to the file; +* `cloud:remove_file(path)` - deletes file; +* `cloud:list_dir(path)` - returns metadata table of all files and subdirectories; +* `cloud:create_dir(path)` - creates directory; + +All data are returned in `on_cloud_result(meta, content)`. The first argument is the metadata, either a metadata table (in the case of `list_dir()`) or an error message string. The second argument is the contents of the file (in the case of `get_file()`). + # Settings * `settings:get()` - returns the settings table in an array of words format; diff --git a/README_ru.md b/README_ru.md index 9bf2d52..75133c1 100644 --- a/README_ru.md +++ b/README_ru.md @@ -185,6 +185,17 @@ ui:show_context_menu({ * `wind_speed` - скорость ветра; * `wind_direction` - направление ветра. +# Облако + +* `cloud:get_metadata(path)` - возвращает таблицу с метаданными файла; +* `cloud:get_file(path)` - возвращает содержимое файла; +* `cloud:put_file(sting, path)` - записывает строку в файл; +* `cloud:remove_file(path)` - удаляет файл; +* `cloud:list_dir(path)` - возвращает таблицу таблиц метаданных всех файлов и подкаталогов; +* `cloud:create_dir(path)` - создает каталог; + +Все данные возвращаются в `on_cloud_result(meta, content)`. Первый аргумент - это метаданные, либо таблица метаданных (в случае с `list_dir()`), либо строка с сообщением об ошибке. Второй аргумент - содержимое файла (в случае `get_file()`). + # Настройки * `settings:get()` - возвращает таблицу настроек в формате массива слов;