Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated for node 0.10.0

  • Loading branch information...
commit 6b4b1f426ee1176e8152040d752b16e7fd6e04b8 1 parent 40c66c3
@egorFiNE authored
Showing with 8 additions and 8 deletions.
  1. +1 −1  README.md
  2. +3 −3 Symbol.js
  3. +3 −3 TickStorage.js
  4. +1 −1  package.json
View
2  README.md
@@ -72,7 +72,7 @@ ExtraLog.log("Hello at %D", Date.unixtime());
# Requirements
-* **Node.js** >= 0.6.0; s
+* **Node.js** >= 0.10.0; s
* **node-date-utils** https://github.com/JerrySievert/node-date-utils or <code>npm install date-utils</code>;
* **node-compress-buffer** https://github.com/egorFiNE/node-compress-buffer or <code>npm install compress-buffer</code>;
* **optimist** https://github.com/substack/node-optimist.git or <code>npm install optimist</code>;
View
6 Symbol.js
@@ -74,7 +74,7 @@ Load meta information from <code>dbPath/symbol/meta.json</code>.
Symbol.prototype._loadMeta = function() {
- if (path.existsSync(this._metaFilename)) {
+ if (fs.existsSync(this._metaFilename)) {
try {
var data = fs.readFileSync(this._metaFilename);
data = data.toString();
@@ -109,7 +109,7 @@ Symbol.prototype._saveMeta = function() {
var data = JSON.stringify(this.meta);
fs.writeFileSync(this._metaFilename+'.tmp', data);
- if (path.existsSync(this._metaFilename)) {
+ if (fs.existsSync(this._metaFilename)) {
fs.unlinkSync(this._metaFilename);
}
fs.renameSync(this._metaFilename+'.tmp', this._metaFilename);
@@ -130,7 +130,7 @@ Symbol.prototype.load = function() {
this.days=[];
this.dayPosition=0;
- if (!path.existsSync(this.dirPath)) {
+ if (!fs.existsSync(this.dirPath)) {
return false;
}
View
6 TickStorage.js
@@ -154,7 +154,7 @@ Return true if this file exists in tick database.
*/
TickStorage.prototype.exists = function() {
- return path.existsSync(this._path+this._filename);
+ return fs.existsSync(this._path+this._filename);
};
/**
@@ -258,7 +258,7 @@ TickStorage.prototype.seek = function(ticks, whence) {
};
TickStorage.prototype._possiblyCreatePath = function() {
- if (!path.existsSync(this._path)) {
+ if (!fs.existsSync(this._path)) {
try {
fs.mkdirSync(this._path, 0755);
} catch (e) {
@@ -335,7 +335,7 @@ TickStorage.prototype.save = function(quick) {
}
fs.closeSync(fd);
- if (path.existsSync(this._path+this._filename)) {
+ if (fs.existsSync(this._path+this._filename)) {
try {
fs.unlinkSync(this._path+this._filename);
} catch (e) {
View
2  package.json
@@ -1,7 +1,7 @@
{
"name": "stock",
"description": "A fast and efficient Node.js storage engine for stock market tick data and couple of modules for trading software development.",
- "version": "0.0.9",
+ "version": "0.0.10",
"author": "Egor Egorov <me@egorfine.com>",
"homepage": "http://egorfine.github.com/node-stock",
"bugs": {
Please sign in to comment.
Something went wrong with that request. Please try again.