Registers all of the files in the the directory path
323950
def register_directory(self, dirpath, **kwargs):
        

        kwargs['file_extensions'] = kwargs.get("file_extensions",
                                               self.rdf_formats)
        files = list_files(file_directory=dirpath, **kwargs)
        for fileinfo in files:
            self.register_rml(fileinfo[-1], **kwargs)
428733
public static function registerModulePath($path)
    {
        if (file_exists($path)) {
            self::$_modulePaths[] = $path;
        } else {
            user_error(__d('wasabi_cms', 'Module path {0} does not exist.', $path));
        }
    }
444589
private void _registerDirRecursive (@Nonnull final Path aStartDir) throws IOException
  {
    // register directory and sub-directories
    Files.walkFileTree (aStartDir, new SimpleFileVisitor <Path> ()
    {
      @Override
      public FileVisitResult preVisitDirectory (final Path dir, final BasicFileAttributes attrs) throws IOException
      {
        _registerDir (dir);
        return FileVisitResult.CONTINUE;
      }
    });
  }
367376
private void register(Path dir) throws IOException {
//        WatchKey key = dir.register(watcher, ENTRY_CREATE, ENTRY_MODIFY);
        WatchKey key = dir.register(watcher, new WatchEvent.Kind[]{StandardWatchEventKinds.ENTRY_MODIFY, StandardWatchEventKinds.ENTRY_DELETE, StandardWatchEventKinds.ENTRY_CREATE}, SensitivityWatchEventModifier.HIGH);
        if (trace) {
            Path prev = keys.get(key);
            if (prev == null) {
                System.out.format("register: %s\n", dir);
            } else {
                if (!dir.equals(prev)) {
                    System.out.format("update: %s -> %s\n", prev, dir);
                }
            }
        }
        keys.put(key, dir);
    }
35567
protected function registerViews()
    {
        $path      = $this->getBasePath() . '/' . $this->convention->viewsFolder();
        $namespace = $this->config('views.namespace', $this->shortName());

        if (is_dir($path)) {
            $this->loadViewsFrom($path, $namespace);
        }
    }
626939
def reload_extensions_dir path
    loaded = Set.new(typenames.select { |x| @namespace.const_defined? x })
    Dir.open(path) do |dir|
      dir.each do |file|
        next unless file =~ /\.rb$/
        next unless loaded.member? $`
        file_path = File.join(dir, file)
        load file_path
      end
    end
  end
1063206
private void registerDirectory(Path dir) throws IOException {
        Files.walkFileTree(dir, new SimpleFileVisitor<Path>() {

            @Override
            public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
                WatchKey key = dir.register(watchService, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);
                watchKeyToDirectory.put(key, dir);

                return FileVisitResult.CONTINUE;
            }

        });
    }
591781
def AddDir(self, dirpath):
    
    if dirpath not in self._dirs:
      self._dirs.add(dirpath)
      return True
    return False
863559
private void register(Path dir, List<PathMapping> pathMapping) throws IOException {

		WatchKey key = dir.register(watchService, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);
		keys.put(key, dir);

		List<PathMapping> m = pathToResourceBundle.get(dir);
		if (m == null) {
			m = new ArrayList<>();
			pathToResourceBundle.put(dir, m);
		}
		m.addAll(pathMapping);
	}
334573
public function registerFile($path)
    {
        $hash = md5($path);

        if(!isset($this->_files[$hash])) {
            $this->_files[$hash] = $path;
        }

        return $this;
    }
646619
public function register() {
		$this->files = new Filesystem;
		$this->registerMakeCommand();
		$this->registerListCommand();
		$this->registerMigrateCommand();
		$this->registerMigrateAllCommand();
		$this->registerDeleteCommand();
	}
1150128
protected function registerResources()
    {
        $userConfigFile = $this->app->configPath().'/stream-laravel.php';
        $packageConfigFile = __DIR__.'/../../config/config.php';
        $config = $this->app['files']->getRequire($packageConfigFile);

        if (file_exists($userConfigFile)) {
            $userConfig = $this->app['files']->getRequire($userConfigFile);
            $config = array_replace_recursive($config, $userConfig);
        }

        $namespace = 'stream-laravel::';

        foreach($config as $key => $value) {
            $this->app['config']->set($namespace . $key , $value);
        }
    }
782422
protected function registerBootstrap()
    {
        $directory = $this->getBootstrapPath();

        if (! is_dir($directory)) {
            return;
        }

        $files = Finder::create()
            ->files()
            ->name('/^.+\.php$/')
            ->notName('routes.php')
            ->notName('navigation.php')
            ->in($directory)
            ->sort(function (SplFileInfo $a) {
                return $a->getFilename() != 'bootstrap.php';
            });

        foreach ($files as $file) {
            require_once $file;
        }
    }
1048436
protected function registerErrorViewPaths()
    {
        $paths = collect(config('view.paths'));

        View::replaceNamespace('errors', $paths->map(function ($path) {
            return "{$path}/errors";
        })->push(__DIR__.'/views')->all());
    }
302494
function addAllFilesAndSubdirectories(dir, doneCallback) {
            FileSystem.resolve(dir, function (err, directory) {
                function visitor(entry) {
                    if (entry.isFile) {
                        if (!isFileExcluded(entry)) { // ignore .dotfiles and non-.js files
                            addFilesToTern([entry.fullPath]);
                        }
                    } else {
                        return !isDirectoryExcluded(entry.fullPath) &&
                            entry.name.indexOf(".") !== 0 &&
                            !stopAddingFiles;
                    }
                }

                if (err) {
                    return;
                }

                if (dir === FileSystem.getDirectoryForPath(rootTernDir)) {
                    doneCallback();
                    return;
                }

                directory.visit(visitor, doneCallback);
            });
        }
1325067
def register_from_dir(cls, dir_path, prefix=''):
        

        for filename in os.listdir(dir_path):
            name, file_ext = os.path.splitext(filename)
            if file_ext in cls._formats:
                fkey = '{0}{1}'.format(prefix, name)
                cls.register(fkey, os.path.join(dir_path, filename))
771756
def add(self, path):
        
        name_with_ext = os.path.split(path)[1]  # split directory and filename
        name = name_with_ext.split('.')[0]  # remove extension
        self.list.update({name: path})