Mistake on this page? Email us
edge_io_lib.h
Go to the documentation of this file.
1 /*
2  * ----------------------------------------------------------------------------
3  * Copyright 2018 ARM Ltd.
4  *
5  * SPDX-License-Identifier: Apache-2.0
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ----------------------------------------------------------------------------
19  */
20 
21 #ifndef EDGE_IO_LIB_H
22 #define EDGE_IO_LIB_H
23 
24 #include <stdbool.h>
25 
44 bool edge_io_file_exists(const char *path);
45 
54 bool edge_io_acquire_lock_for_socket(const char *path, int *lock_fd);
55 
64 bool edge_io_release_lock_for_socket(const char *path, int lock_fd);
65 
71 int edge_io_unlink(const char *path);
72 
78 #endif
int edge_io_unlink(const char *path)
Removes the file for the given path.
bool edge_io_file_exists(const char *path)
Check if a file exists using underlying OS call.
bool edge_io_release_lock_for_socket(const char *path, int lock_fd)
Releases the lock and deletes the lock file for the Unix Domain socket. The lock file will the given ...
bool edge_io_acquire_lock_for_socket(const char *path, int *lock_fd)
Acquires a lock file for the given Unix Domain socket path. The lock file will the given socket path ...