Exemple #1
0
        public override Stream GetMaterialContent(string contentID)
        {
            DestFileInfo.NullCheck("DestFileInfo");

            ExceptionHelper.FalseThrow <FileNotFoundException>(File.Exists(DestFileInfo.FullName), Resource.FileNotFound, DestFileInfo.FullName);

            return(DestFileInfo.OpenRead());
        }
Exemple #2
0
        public override void SaveMaterialContent(MaterialContent content)
        {
            SourceFileInfo.NullCheck("SourceFileInfo");
            DestFileInfo.NullCheck("DestFileInfo");

            if (CheckSourceFileExists)
            {
                ExceptionHelper.FalseThrow(SourceFileInfo.Exists, string.Format(Resource.FileNotFound, SourceFileInfo.Name));
            }

            MoveFile(SourceFileInfo, DestFileInfo);
        }
Exemple #3
0
        public override void DeleteMaterialContent(MaterialContent content)
        {
            DestFileInfo.NullCheck("DestFileInfo");

            DeleteFile(DestFileInfo);
        }
Exemple #4
0
        public override bool ExistsContent(string contentID)
        {
            DestFileInfo.NullCheck("DestFileInfo");

            return(DestFileInfo.Exists);
        }