Example #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);
        }
Example #2
0
        public void Delete(string pool, string id)
        {
            PoolFile poolFile = Find(id);

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

            //
            if (poolFile.Exists)
            {
                File.Delete(poolFile.GetPhysicalPath());
            }
        }
Example #3
0
        public PoolFile Find(string id)
        {
            PoolFile poolFile = new PoolFile(id);

            return(poolFile);
        }