code: function _setMenuItemsVisible() {
          var file = MainViewManager.getCurrentlyViewedFile(MainViewManager.ACTIVE_PANE);
          if (file) {
              file.exists(function (err, isPresent) {
                  if (err) {
                      return err;
                  }
                  _setContextMenuItemsVisible(isPresent, [Commands.FILE_RENAME, Commands.NAVIGATE_SHOW_IN_FILE_TREE, Commands.NAVIGATE_SHOW_IN_OS]);   
              });
          }
      }
docs: Checks if file saved and present on system and
  disables menu items accordingly