Example #1
0
        public void IndexThis()
        {
            var pathEnumerator = new PathEnumerator("C:\\", new[]
            {
                @":\\Windows",
                @":\\Program Files \(x86\)\\",
                @":\\Program Files\\",
                @":\\Users\\.*\\\..*",
                @":\\Users\\.*\\AppData\\Local.*\\",
                @":\\Users\\.*\\AppData\\Roaming\\",
                @":\\Users\\.*\\Searches",
                @"IISExpress\\TraceLogFiles",
                @"\\node_modules",
                @"\\wwwroot\\lib"
            });

            Assert.That(() => pathEnumerator.Index(), Throws.Nothing);
            var path = pathEnumerator.NodeEnvelopes.First().ToString();
        }
Example #2
0
        public void IndexPictures()
        {
            var pathEnumerator = new PathEnumerator(@"\\192.168.178.22\public", new[]
            {
                @":\\Windows",
                @":\\Program Files \(x86\)\\",
                @":\\Program Files\\",
                @":\\Users\\.*\\\..*",
                @":\\Users\\.*\\AppData\\Local.*\\",
                @":\\Users\\.*\\AppData\\Roaming\\",
                @":\\Users\\.*\\Searches",
                @"IISExpress\\TraceLogFiles",
                @"\\node_modules",
                @"\\wwwroot\\lib"
            });

            pathEnumerator.Index();

            var nodeEnvelopes = pathEnumerator.NodeEnvelopes;
            var root          = NodeHierarchyRoot.CreateNodeHierarchy(nodeEnvelopes);
            var envelopes     = JsonStringHelper.CreateString(pathEnumerator.NodeEnvelopes);

            JsonStringHelper.WriteToCompressedFile("envelopes.json.gz", envelopes);
        }