(path)
| 107 | } |
| 108 | |
| 109 | function existsSync(path) |
| 110 | { |
| 111 | if(!fs.existsSync(path)) |
| 112 | return false; |
| 113 | |
| 114 | const stat = fs.statSync(path); |
| 115 | |
| 116 | if(stat.size === 0) |
| 117 | return false; |
| 118 | |
| 119 | const isDownloading = p.join(p.dirname(path), sha1(path)+'-is-downloading.txt'); |
| 120 | |
| 121 | if(fs.existsSync(isDownloading)) |
| 122 | return false; |
| 123 | |
| 124 | return true; |
| 125 | } |
| 126 | |
| 127 | var closeServersST = {}; |
| 128 |