Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added sublime project

  • Loading branch information...
commit 2e63b16364f1d57bf0fb73b7572c569e0369c114 1 parent 67bb3e5
@crcn authored
View
2  .cupboard
@@ -1,2 +1,2 @@
[commands]
-proj = open project.tmproj
+proj = subl --project project.sublime-project
View
1  node_modules/Structr
View
18 node_modules/node-fs/LICENSE
@@ -0,0 +1,18 @@
+Copyright 2010 Bruno Pedro. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
View
6 node_modules/node-fs/README.md
@@ -0,0 +1,6 @@
+node-fs is an extension to the original [nodejs](http://nodejs.org) [fs library](http://nodejs.org/docs/v0.3.1/api/fs.html), offering new functionalities. See example.js for an example of how to use it.
+
+Right now, the following new operations are supported:
+
+* mkdir(path, mode, [recursive], [callback]): if the 'recursive' parameter is true, creates a directory recursively;
+* mkdirSync(path, mode, [recursive]): if the 'recursive' parameter is true, synchronously creates a directory recursively.
View
32 node_modules/node-fs/example.js
@@ -0,0 +1,32 @@
+//
+// Require our fs lib, not the original.
+//
+var fs = require('./lib/fs');
+
+//
+// Example with non-recursion.
+//
+fs.mkdir('/tmp/example_dir/first/second/third/fourth/fifth', 0777, function (err) {
+ if (err) {
+ console.log(err);
+ } else {
+ console.log('Directory created');
+ }
+});
+
+//
+// Example with recursion -- notice the parameter
+// right before the callback function.
+//
+fs.mkdir('/tmp/example_dir/first/second/third/fourth/fifth', 0777, true, function (err) {
+ if (err) {
+ console.log(err);
+ } else {
+ console.log('Directory created');
+ }
+});
+
+//
+// Synchronous example with recursion.
+//
+fs.mkdirSync('/tmp/example_sync/first/second/third/fourth/fifth', 0777, true);
View
109 node_modules/node-fs/lib/fs.js
@@ -0,0 +1,109 @@
+(function () {
+ 'use strict';
+
+ var fs = require('fs'),
+ mkdirOrig = fs.mkdir,
+ mkdirSyncOrig = fs.mkdirSync;
+
+ /**
+ * Offers functionality similar to mkdir -p
+ *
+ * Asynchronous operation. No arguments other than a possible exception
+ * are given to the completion callback.
+ */
+ function mkdir_p (path, mode, callback, position) {
+ var parts = require('path').normalize(path).split('/');
+
+ mode = mode || process.umask();
+ position = position || 0;
+
+ if (position >= parts.length) {
+ return callback();
+ }
+
+ var directory = parts.slice(0, position + 1).join('/') || '/';
+ fs.stat(directory, function(err) {
+ if (err === null) {
+ mkdir_p(path, mode, callback, position + 1);
+ } else {
+ mkdirOrig(directory, mode, function (err) {
+ if (err && err.errno != 17) {
+ return callback(err);
+ } else {
+ mkdir_p(path, mode, callback, position + 1);
+ }
+ });
+ }
+ });
+ }
+
+ function mkdirSync_p(path, mode, position) {
+ var parts = require('path').normalize(path).split('/');
+
+ mode = mode || process.umask();
+ position = position || 0;
+
+ if (position >= parts.length) {
+ return true;
+ }
+
+ var directory = parts.slice(0, position + 1).join('/') || '/';
+ try {
+ fs.statSync(directory);
+ mkdirSync_p(path, mode, position + 1);
+ } catch (e) {
+ try {
+ mkdirSyncOrig(directory, mode);
+ mkdirSync_p(path, mode, position + 1);
+ } catch (e) {
+ if (e.errno != 17) {
+ throw err;
+ }
+ mkdirSync_p(path, mode, position + 1);
+ }
+ }
+ }
+
+ /**
+ * Polymorphic approach to fs.mkdir()
+ *
+ * If the third parameter is boolean and true assume that
+ * caller wants recursive operation.
+ */
+ fs.mkdir = function (path, mode, recursive, callback) {
+ if (typeof recursive !== 'boolean') {
+ callback = recursive;
+ recursive = false;
+ }
+
+ if (typeof callback !== 'function') {
+ callback = function () {};
+ }
+
+ if (!recursive) {
+ mkdirOrig(path, mode, callback);
+ } else {
+ mkdir_p(path, mode, callback);
+ }
+ }
+
+ /**
+ * Polymorphic approach to fs.mkdirSync()
+ *
+ * If the third parameter is boolean and true assume that
+ * caller wants recursive operation.
+ */
+ fs.mkdirSync = function (path, mode, recursive) {
+ if (typeof recursive !== 'boolean') {
+ recursive = false;
+ }
+
+ if (!recursive) {
+ mkdirSyncOrig(path, mode);
+ } else {
+ mkdirSync_p(path, mode);
+ }
+ }
+
+ module.exports = fs;
+}());
View
28 node_modules/node-fs/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "node-fs",
+ "description": "node-fs is an extension to the original nodejs fs library, offering new functionalities.",
+ "version": "0.1.0",
+ "author": "Bruno Pedro <bpedro@tarpipe.com>",
+
+ "repository": {
+ "type" : "git",
+ "url": "git://github.com/bpedro/node-fs.git"
+ },
+
+ "os": [ "linux", "darwin", "freebsd" ],
+
+ "directories": {
+ "lib": "./lib/"
+ },
+
+ "main": "./lib/fs",
+
+ "engines": {
+ "node": ">=0.1.97"
+ },
+
+ "licenses": [{
+ "type" : "MIT",
+ "url" : "https://github.com/bpedro/node-fs/raw/master/LICENSE"
+ }]
+}
View
8 project.sublime-project
@@ -0,0 +1,8 @@
+{
+ "folders":
+ [
+ {
+ "path": "/Users/craig/.cupboard/projects/gittyup"
+ }
+ ]
+}
Please sign in to comment.
Something went wrong with that request. Please try again.