Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
vfs_user.h
00001 /** 00002 * @file vfs_user.h 00003 * @brief VFS user files header. 00004 * 00005 * DAPLink Interface Firmware 00006 * Copyright (c) 2020, ARM Limited, All Rights Reserved 00007 * SPDX-License-Identifier: Apache-2.0 00008 * 00009 * Licensed under the Apache License, Version 2.0 (the "License"); you may 00010 * not use this file except in compliance with the License. 00011 * You may obtain a copy of the License at 00012 * 00013 * http://www.apache.org/licenses/LICENSE-2.0 00014 * 00015 * Unless required by applicable law or agreed to in writing, software 00016 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 00017 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00018 * See the License for the specific language governing permissions and 00019 * limitations under the License. 00020 */ 00021 00022 #ifndef VFS_USER_H 00023 #define VFS_USER_H 00024 00025 #include <stdbool.h> 00026 #include "virtual_fs.h" 00027 00028 #ifdef __cplusplus 00029 extern "C" { 00030 #endif 00031 00032 //! @brief Hook for file changes in root directory. 00033 //! 00034 //! @param filename Name of the file that has changed. 00035 //! @param change Type of change. 00036 //! @param file 00037 //! @param new_file_data Data being written to the file if _change_ is #VFS_FILE_CHANGED. 00038 //! @retval true The hook handled the change notification, the caller should do nothing else. 00039 //! @retval false The hook did nothing, continue with normal behaviour. 00040 bool vfs_user_file_change_handler_hook(const vfs_filename_t filename, 00041 vfs_file_change_t change, vfs_file_t file, vfs_file_t new_file_data); 00042 00043 //! @brief Hook for magic files. 00044 //! 00045 //! This hook is intended to simplify checking for magic files. In addition to allowing support for 00046 //! new magic files, you can also change the behaviour of or disable standard magic files. 00047 //! 00048 //! @param filename Name of the file that was created. 00049 //! @param[out] do_remount Whether the caller should remount the MSD volume. Only applies if true 00050 //! is returned. The default is true, so if the hook does not modify this parameter and returns 00051 //! true, a remount is performed. 00052 //! @retval true The hook handled the specified file. A remount will be performed if requested, 00053 //! but otherwise no other standard behaviour is applied. 00054 //! @retval false The hook did not handle the file; continue with canonical behaviour. 00055 bool vfs_user_magic_file_hook(const vfs_filename_t filename, bool *do_remount); 00056 00057 #ifdef __cplusplus 00058 } 00059 #endif 00060 00061 #endif // VFS_USER_H
Generated on Tue Jul 12 2022 15:37:28 by
