Пример #1
0
        public void SaveFileInfo(PoolFile poolFile, string physicalPath)
        {
            FileInfo fileInfo = new FileInfo(physicalPath);

            poolFile.Exists = fileInfo.Exists;
            poolFile.Length = fileInfo.Length;
            poolFile.SetPhysicalPath(physicalPath);
            poolFile.SetCreationTimeUtc(fileInfo.CreationTimeUtc);
            poolFile.SetLastWriteTimeUtc(fileInfo.LastWriteTimeUtc);

            //
            CreateInfoAccessor().Add(poolFile);
        }
Пример #2
0
        public void Delete(string pool, string id)
        {
            PoolFile poolFile = Find(id);

            //
            CreateInfoAccessor().Delete(pool, id);

            //
            if (poolFile.Exists)
            {
                File.Delete(poolFile.GetPhysicalPath());
            }
        }
Пример #3
0
        public PoolFile Find(string id)
        {
            PoolFile poolFile = new PoolFile(id);

            return(poolFile);
        }