refactor(dir) rm main

This commit is contained in:
coderaiser 2014-06-19 09:13:28 -04:00
parent 01a3362313
commit 67f25439be

View file

@ -2,28 +2,31 @@
(function(){
'use strict';
if(!global.cloudcmd)
return console.log(
'# dir.js' + '\n' +
'# -----------' + '\n' +
'# Module is part of Cloud Commander,' + '\n' +
'# used for getting dir size.' + '\n' +
'# If you wont to see at work' + '\n' +
'# try GET /api/v1/fs/etc?size or' + '\n' +
'# dir.getSize(\'/etc, function(err, size) {' + '\n' +
'# });' + '\n' +
'# http://cloudcmd.io' + '\n');
/*
'# dir.js' + '\n' +
'# -----------' + '\n' +
'# Module is part of Cloud Commander,' + '\n' +
'# used for getting dir size.' + '\n' +
'# If you wont to see at work' + '\n' +
'# try GET /api/v1/fs/etc?size or' + '\n' +
'# dir.getSize(\'/etc, function(err, size) {' + '\n' +
'# });' + '\n' +
'# http://cloudcmd.io' + '\n');
*/
var main = global.cloudcmd.main,
fs = main.fs,
Util = main.util,
path = main.path,
var fs = require('fs'),
path = require('path'),
Util = require('../util'),
/* The lstat() function shall be equivalent to stat(),
except when path refers to a symbolic link. In that case lstat()
shall return information about the link, while stat() shall return
information about the file the link references.
*/
stat = fs.lstat.bind(fs);
stat = fs.lstat;
exports.isDir = function(name, callback) {
name += '';