using System; using System.Collections.Generic; using Umbraco.Core.Models; namespace Umbraco.Core.Services { /// /// Defines the File Service, which is an easy access to operations involving objects like Scripts, Stylesheets and Templates /// public interface IFileService : IService { IEnumerable GetPartialViewSnippetNames(params string[] filterNames); void DeletePartialViewFolder(string folderPath); void DeletePartialViewMacroFolder(string folderPath); IPartialView GetPartialView(string path); IPartialView GetPartialViewMacro(string path); Attempt CreatePartialView(IPartialView partialView, string snippetName = null, int userId = 0); Attempt CreatePartialViewMacro(IPartialView partialView, string snippetName = null, int userId = 0); bool DeletePartialView(string path, int userId = 0); bool DeletePartialViewMacro(string path, int userId = 0); Attempt SavePartialView(IPartialView partialView, int userId = 0); Attempt SavePartialViewMacro(IPartialView partialView, int userId = 0); bool ValidatePartialView(PartialView partialView); bool ValidatePartialViewMacro(PartialView partialView); /// /// Gets a list of all objects /// /// An enumerable list of objects IEnumerable GetStylesheets(params string[] names); /// /// Gets a object by its name /// /// Name of the stylesheet incl. extension /// A object Stylesheet GetStylesheetByName(string name); /// /// Saves a /// /// to save /// Optional id of the user saving the stylesheet void SaveStylesheet(Stylesheet stylesheet, int userId = 0); /// /// Deletes a stylesheet by its name /// /// Name incl. extension of the Stylesheet to delete /// Optional id of the user deleting the stylesheet void DeleteStylesheet(string path, int userId = 0); /// /// Validates a /// /// to validate /// True if Stylesheet is valid, otherwise false bool ValidateStylesheet(Stylesheet stylesheet); /// /// Gets a list of all objects /// /// An enumerable list of objects IEnumerable