How to use the safefs.readFile function in safefs

To help you get started, we’ve selected a few safefs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bevry-archive / feedr / source / index.js View on Github external
`Feedr === reading [${feed.url}] on [${path}], it doesn't exist`
					)

					// Exit
					readFileComplete()
					return
				}

				// Log
				me.log(
					'debug',
					`Feedr === reading [${feed.url}] on [${path}], it exists, now reading`
				)

				// It does exist, so let's continue to read the cached fie
				safefs.readFile(path, null, function(err, rawData) {
					// Check
					if (err) {
						// Log
						me.log(
							'debug',
							`Feedr === reading [${feed.url}] on [${path}], it exists, read failed`,
							err.stack
						)

						// Exit
						readFileComplete(err)
						return
					}

					// Log
					me.log(
github bevry / projectz / source / lib / projectz.js View on Github external
tasks.addTask(message, complete => {
								this.log('info', message)
								readFile(filePath, (err, data) => {
									if (err) return complete(err)
									this.filenamesForReadmeFiles[key] = file
									this.dataForReadmeFiles[key] = data.toString()
									complete(err)
								})
							})
						}

safefs

Stop getting EMFILE errors! Open only as many files as the operating system supports.

Artistic-2.0
Latest version published 12 months ago

Package Health Score

63 / 100
Full package analysis