mirror of
				https://github.com/flynx/pWiki.git
				synced 2025-10-31 11:00:08 +00:00 
			
		
		
		
	notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									56013209f2
								
							
						
					
					
						commit
						b80ec63f53
					
				| @ -763,15 +763,21 @@ module.FileStore = { | |||||||
| 				: fs.readFileSync(p).toString(), | 				: fs.readFileSync(p).toString(), | ||||||
| 		} }, | 		} }, | ||||||
| 	// XXX handle writing to directories...
 | 	// XXX handle writing to directories...
 | ||||||
|  | 	// 		i.e. write to "./"+ this.__directory_text__
 | ||||||
|  | 	// XXX would need to convert a file to a dir if writing to sub-path...
 | ||||||
|  | 	// XXX recursively create all dirs...
 | ||||||
| 	// XXX do we write all the data or only the .text???
 | 	// XXX do we write all the data or only the .text???
 | ||||||
| 	__update__: async function(path, data, mode='update'){ | 	__update__: async function(path, data, mode='update'){ | ||||||
| 		var p = module.path.join(this.__path__, path) | 		var p = module.path.join(this.__path__, path) | ||||||
|  | 
 | ||||||
| 		var f = await fs.promises.open(p, 'w') | 		var f = await fs.promises.open(p, 'w') | ||||||
| 		var size = await f.writeFile(data.text) | 		var size = await f.writeFile(data.text) | ||||||
| 		f.close() | 		f.close() | ||||||
| 		// XXX check size...
 | 		// XXX check size...
 | ||||||
| 		// XXX
 | 		// XXX
 | ||||||
| 	}, | 	}, | ||||||
|  | 	// XXX remove empty dirs (???)
 | ||||||
|  | 	// XXX convert a dir to a file if removing last sub-file/dir...
 | ||||||
|     __delete__: async function(path){ |     __delete__: async function(path){ | ||||||
| 		var p = module.path.join(this.__path__, path) | 		var p = module.path.join(this.__path__, path) | ||||||
| 		// XXX
 | 		// XXX
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user