文件操作 - interval_set.h
返回文件管理
返回主菜单
删除本文件
文件: /usr/src/file_protector-1.1-1538/interval_set.h
编辑文件内容
/** @file interval_set.h @brief Interval sets @details Copyright (c) 2024 Acronis International GmbH @author Bruce Wang (bruce.wang@acronis.com) @since $Id: $ */ #include <linux/rbtree.h> #include <linux/types.h> #ifdef KERNEL_MOCK #include <mock/mock.h> #endif typedef struct { struct rb_root root; // The interval_count should be less then the size of file uint64_t interval_count; #ifdef INTERVAL_SET_DEBUG uint64_t total_interval_size; #endif } interval_set_t; #ifdef HAVE_INTERVAL_SET void clean_interval_tree(interval_set_t *set); bool insert_interval(uint64_t low, uint64_t high, interval_set_t *set); bool check_interval(uint64_t low, uint64_t high, interval_set_t *set); #else static inline void clean_interval_tree(interval_set_t *set) { (void) set; } static inline bool insert_interval(uint64_t low, uint64_t high, interval_set_t *set) { (void) low; (void) high; (void) set; return false; } static inline bool check_interval(uint64_t low, uint64_t high, interval_set_t *set) { (void) low; (void) high; (void) set; return false; } #endif
修改文件时间
将文件时间修改为当前时间的前一年
删除文件