Rainy.CustomHandler.FilesystemHandler.FilesystemHandler C# (CSharp) Method

FilesystemHandler() public method

public FilesystemHandler ( string route_path, string htdocs_path ) : System
route_path string
htdocs_path string
return System
        public FilesystemHandler(string route_path, string htdocs_path)
        {
            if (!Directory.Exists(htdocs_path)) {
                // TODO make case insensitive
                //throw new ArgumentException(htdocs_path);
                active = false;
            }
            HtdocsPath = htdocs_path;

            if (!route_path.StartsWith("/"))
                route_path = "/" + route_path;
            if (!route_path.EndsWith("/"))
                route_path = route_path + "/";

            RoutePath = route_path;

            DefaultFilename = "index.html";
        }