54 authenticationContext,
101 Logger.LogInformation(
e,
"IOException while updating file {path}!",
model.Path);
104 AdditionalData = e.Message,
144 Logger.LogInformation(
e,
"IOException while reading file {path}!",
filePath);
147 AdditionalData = e.Message,
199 Logger.LogInformation(
ex,
"IOException while enumerating directory!");
203 AdditionalData = ex.Message,
244 if (
model.Path ==
null)
275 Logger.LogInformation(
e,
"IOException while creating directory {path}!",
model.Path);
331 Logger.LogInformation(
ex,
"IOException while deleting directory!");
334 Message = ex.Message,
Metadata about a server instance.
ConfigurationType? ConfigurationType
If IConfigurationFiles can be used on the Instance.
Represents a request to update a configuration file.
Response when reading configuration files.
string? Path
The path to the IConfigurationFile file.
Represents an error message returned by the server.
Represents a paginated set of models.
Routes to a server actions.
const string List
The postfix for list operations.
const string File
To be paired with Configuration for accessing Models.IConfigurationFiles.
const string Configuration
The configuration controller.
ILogger< ApiController > Logger
The ILogger for the ApiController.
readonly IInstanceManager instanceManager
The IInstanceManager for the ComponentInterfacingController.
async ValueTask< IActionResult > WithComponentInstance(Func< IInstanceCore, ValueTask< IActionResult > > action, Models.Instance? instance=null)
Run a given action with the relevant IInstance.
The ApiController for IConfigurationFiles.
async ValueTask< IActionResult > DeleteDirectory([FromBody] ConfigurationFileRequest directory, CancellationToken cancellationToken)
Deletes an empty directory .
ConfigurationController(IDatabaseContext databaseContext, IAuthenticationContext authenticationContext, ILogger< ConfigurationController > logger, IInstanceManager instanceManager, IIOManager ioManager, IApiHeadersProvider apiHeaders)
Initializes a new instance of the ConfigurationController class.
async ValueTask< IActionResult > Update([FromBody] ConfigurationFileRequest model, CancellationToken cancellationToken)
Write to a configuration file.
ValueTask< IActionResult > Directory(string? directoryPath, [FromQuery] int? page, [FromQuery] int? pageSize, CancellationToken cancellationToken)
Get the contents of a directory at a directoryPath .
readonly IIOManager ioManager
The IIOManager for the ConfigurationController.
ValueTask< IActionResult > List([FromQuery] int? page, [FromQuery] int? pageSize, CancellationToken cancellationToken)
Get the contents of the root configuration directory.
async ValueTask< IActionResult > File(string filePath, CancellationToken cancellationToken)
Get the contents of a file at a filePath .
bool ForbidDueToModeConflicts(string? path, out ISystemIdentity? systemIdentityToUse)
If a ForbidResult should be returned from actions due to conflicts with one or both of the Api....
async ValueTask< IActionResult > CreateDirectory([FromBody] ConfigurationFileRequest model, CancellationToken cancellationToken)
Create a configuration directory.
ComponentInterfacingController for operations that require an instance.
Helper for returning paginated models.
ISystemIdentity? SystemIdentity
The ISystemIdentity of User if applicable.
Interface for using filesystems.
bool PathContainsParentAccess(string path)
Check if a path contains the '..' parent directory accessor.
For creating and accessing authentication contexts.
Represents a user on the current global::System.Runtime.InteropServices.OSPlatform.
ErrorCode
Types of Response.ErrorMessageResponses that the API may return.
ConfigurationType
The type of configuration allowed on an Instance.
ConfigurationRights
Rights for Models.IConfigurationFiles.
@ List
User may list files if the Models.Instance allows it.