parent
							
								
									2222b0d005
								
							
						
					
					
						commit
						af4d9faf0f
					
				|  | @ -1,3 +1,6 @@ | |||
| # 1.2.1 / 2019-08-06 | ||||
| * [U] 写操作改回同步 | ||||
| 
 | ||||
| # 1.2.0 / 2019-07-16 | ||||
| * [U] 优化结构 | ||||
| * [U] 部分写操作改为异步 | ||||
|  |  | |||
							
								
								
									
										12
									
								
								index.js
								
								
								
								
							
							
						
						
									
										12
									
								
								index.js
								
								
								
								
							|  | @ -94,15 +94,15 @@ const Iofs = { | |||
|     } | ||||
| 
 | ||||
|     if (!!append) { | ||||
|       FS.appendFile(file, data, opt, ERROR_FN) | ||||
|       FS.appendFileSync(file, data, opt, ERROR_FN) | ||||
|     } else { | ||||
|       FS.writeFile(file, data, opt, ERROR_FN) | ||||
|       FS.writeFileSync(file, data, opt, ERROR_FN) | ||||
|     } | ||||
|   }, | ||||
| 
 | ||||
|   //修改权限
 | ||||
|   chmod(path, mode) { | ||||
|     FS.chmod(path, mode, ERROR_FN) | ||||
|     FS.chmodSync(path, mode, ERROR_FN) | ||||
|   }, | ||||
| 
 | ||||
|   /** | ||||
|  | @ -152,9 +152,9 @@ const Iofs = { | |||
|       list.forEach(it => { | ||||
|         this.rm(it, this.isdir(it)) | ||||
|       }) | ||||
|       FS.rmdir(origin, ERROR_FN) | ||||
|       FS.rmdirSync(origin, ERROR_FN) | ||||
|     } else { | ||||
|       FS.unlink(origin, ERROR_FN) | ||||
|       FS.unlinkSync(origin, ERROR_FN) | ||||
|     } | ||||
|   }, | ||||
| 
 | ||||
|  | @ -196,7 +196,7 @@ const Iofs = { | |||
|       this.mkdir(updir) | ||||
|     } | ||||
| 
 | ||||
|     FS.mkdir(dir, ERROR_FN) | ||||
|     FS.mkdirSync(dir, ERROR_FN) | ||||
|   }, | ||||
| 
 | ||||
|   /** | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| { | ||||
|   "name": "iofs", | ||||
|   "version": "1.2.0", | ||||
|   "version": "1.2.1", | ||||
|   "description": "Base on native fs module, for easy using.", | ||||
|   "main": "index.js", | ||||
|   "repository": { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 宇天
						宇天