Example #1
0
        public virtual List <string> all(params object[] po)
        {
            List <string> ls = MiMFa_Path.GetAllFiles(MCL.Address.BaseDirectory, true);

            if (!_address)
            {
                ls = MiMFa_CollectionService.ExecuteInAllItems(ls, (s) => System.IO.Path.GetFileNameWithoutExtension(s));
            }
            return(ls);
        }
Example #2
0
        public List <string> search(string name)
        {
            List <string> res     = new List <string>();
            string        address = "";
            bool          bb      = (_search || ((_reclusive || r) && (_file || f || _directory || d || _delete || _create || c || _new)));

            if (bb)
            {
                address = HERE.current;
            }
            else
            {
                address = getpath(name);
            }
            if (_file || f)
            {
                if (isfile(address))
                {
                    res.Add(address);
                }
                else
                {
                    res = MiMFa_Path.GetAllFiles(address, (_reclusive || r));
                }
            }
            else if (_directory || d)
            {
                res = MiMFa_Path.GetAllDirectories(address, (_reclusive || r));
            }
            else
            {
                res = MiMFa_CollectionService.Concat(MiMFa_Path.GetAllDirectories(address, (_reclusive || r)), MiMFa_Path.GetAllFiles(address, (_reclusive || r)));
            }
            if (bb && !name.Contains("\\"))
            {
                res = (from vv in res where vv.Split('\\').Last().Contains(name) select vv).ToList();
            }
            return(res);
        }