예제 #1
0
        private IFileSystem TryGetMountOrNext(ref UPath path, out string mountName)
        {
            mountName = null;
            if (path.IsNull)
            {
                return(null);
            }

            UPath mountSubPath;

            mountName = path.GetFirstDirectory(out mountSubPath);
            IFileSystem mountfs;

            lock (_mounts)
            {
                _mounts.TryGetValue(mountName, out mountfs);
            }

            if (mountfs != null)
            {
                path = mountSubPath.ToAbsolute();
                return(mountfs);
            }
            else if (NextFileSystem != null)
            {
                mountName = null;
                return(NextFileSystem);
            }
            mountName = null;
            return(null);
        }