# FileWatch **Repository Path**: bogegit/FileWatch ## Basic Information - **Project Name**: FileWatch - **Description**: 监听目录文件变化,并生成唯一值保存到xml配置中 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-03-13 - **Last Updated**: 2025-05-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # FileWatch #### 介绍 监听目录文件变化,并生成唯一值保存到xml配置中 #### 使用说明 1. 最低运行版本 jdk21 2. 在根目录配置一个 data.json 配置文件 ``` json [ { "name": "resConfig", "extension": "xml", "watchFile": "F:/ttt", "outPath": "F:/ttt", "excludes": [".tmp",".webp"], "cmpressPng": { "enable": false }, "webp": { "enable": true } }, { "name": "resConfig", "extension": "xml", "watchFile": "F:/tettt", "outPath": "F:/tettt", "excludes": [".tmp"], "cmpressPng": { "enable": false }, "webp": { "enable": false } } ] ``` name: string // 生成的配置文件名字 extension: string // 保存文件格式 watchFile:string // 监控目录 outPath:string // 输出目录 excludes: string[] // 要排除以此名字结尾的文件或目录 localRootPath:string[] // 本地根目录 在生成的url中会删除此设置 cmpressPng: CompressPng webp: WEBP CompressPng 对图片压缩 enable: Boolean = false, //启用压缩 suffix: String = "_low" // 名字添加后缀 quality: String = "10-80" // 精度,递归压缩的比率 0-100 默认为 10-80 WEBP 将图片资源转换成webp enable: Boolean = false, //启用资源转换 compress: Boolean = true // 转换前先压缩图片 webpQuality: Int = 75 // 指定 0 和 100 之间的 RGB 通道压缩因数。默认值为 75。 [cwebp使用资料](https://developers.google.cn/speed/webp/docs/cwebp?hl=zh-cn) #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request