I am new in Node.js. I am trying to check whether the given path is file or directory. So i am trying to use fs but when i try to import fs object by require("fs"), application crash and do not load. I have tried some solution to resolve it but all did not work. Here is sample of my code.
define(function (require, exports, module) {
"use strict";
// Brackets modules
var ProjectManager = require("project/ProjectManager"),
ExtensionUtils = require('utils/ExtensionUtils'),
FileSystem = brackets.getModule("filesystem/FileSystem"),
//AppInit = brackets.getModule("utils/AppInit"),
shellProvider = brackets.getModule('shellAPI/shellProvider');
var fs=require("fs");
Where i am doing wrong. Is there any other way to check if it is file or directory