MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / dfs_file_write

Function dfs_file_write

components/dfs/dfs_v1/src/dfs_file.c:539–552  ·  view source on GitHub ↗

* this function will write some specified length data to file system. * * @param fd the file descriptor. * @param buf the data buffer to be written. * @param len the data buffer length * * @return the actual written data length. */

Source from the content-addressed store, hash-verified

537 * @return the actual written data length.
538 */
539ssize_t dfs_file_write(struct dfs_file *fd, const void *buf, size_t len)
540{
541 if (fd == NULL)
542 {
543 return -EINVAL;
544 }
545
546 if (fd->vnode->fops->write == NULL)
547 {
548 return -ENOSYS;
549 }
550
551 return fd->vnode->fops->write(fd, buf, len);
552}
553
554/**
555 * this function will flush buffer on a file descriptor.

Callers 4

writeFunction · 0.70
copyfileFunction · 0.70
test_dfs_writeFunction · 0.50
test_dfs_renameFunction · 0.50

Calls 1

writeMethod · 0.45

Tested by 2

test_dfs_writeFunction · 0.40
test_dfs_renameFunction · 0.40