BlogEngine.Core.Providers.DbFileSystemExtensions.CopyToFile C# (CSharp) Method

CopyToFile() public static method

copys a database File object to a File object
public static CopyToFile ( this inObj ) : FileSystem.File
inObj this the database file object to copy
return FileSystem.File
        public static FileSystem.File CopyToFile(this FileSystem.FileStoreFile inObj)
        {
            if (inObj == null)
                return null;
            return new FileSystem.File()
            {
                DateCreated = inObj.CreateDate,
                DateModified = inObj.LastModify,
                FilePath = inObj.FullPath,
                FileSize = inObj.Size,
                Id = inObj.FileID.ToString(),
                LastAccessTime = inObj.LastAccess,
                Name = inObj.Name,
                FileContents = inObj.Contents.ToArray(),
                FullPath = inObj.FullPath
            };
        }