isProtected property

bool get isProtected

Check if a log file is protected.

This method verifies whether the log file is marked as protected. A protected log file cannot be automatically deleted by the system, even if the maximum disk space usage is reached or the minimum retention time (in seconds) has passed. This ensures that the log file is preserved for further use or investigation.

Returns

  • True if the file is protected.

Throws

  • An exception if it fails

Implementation

bool get isProtected {
  final OperationResult resultString = objectMethod(
    _pointerId,
    'LogMetadata',
    'isProtected',
  );
  return resultString['result'];
}