示例#1
0
        private static FSDirectory HardDir(Guid applicationId)
        {
            if (_HardDirs == null)
            {
                _HardDirs = new SortedList <Guid, FSDirectory>();
            }

            if (!_HardDirs.ContainsKey(applicationId))
            {
                string path = DocFileInfo.index_folder_address(applicationId);
                if (!System.IO.Directory.Exists(path))
                {
                    System.IO.Directory.CreateDirectory(path);
                }

                FSDirectory dir = FSDirectory.Open(new DirectoryInfo(path));
                _HardDirs.Add(applicationId, dir);
            }

            return(_HardDirs[applicationId]);
        }