دالة SetFileSize [SWS_PER_00428] Upstream: RS_PER_00001, RS_PER_00004, RS_AP_00119, RS_AP_00120, RS_ AP_00128, RS_AP_00127, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159
ara::core::Result< void > SetFileSize (std::uint64_t size) noexcept;
Reduces the size of the file to ’size’, effectively removing the current content of the file beyond this size. The current file position is unchanged if it is lower than ’size’, or set to the last valid position in the file otherwise. If ’size’ is 0, the current file position will also be set to 0.
| Header-Datei | #include "ara/per/write_accessor.h" |
|---|---|
| Scope | class ara::per::WriteAccessor |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | not thread-safe PerErrc::kPhysical no_rollback_semantics |
Parameter (in)
| Parameter | Beschreibung |
|---|---|
| size | New size of the file. |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::core::Result< void > | A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error. |
Fehler
| Fehlercode | Beschreibung |
|---|---|
| StorageFailure | Returned if access to the physical storage fails. |
| PerErrc::kValidationFailed | rollback_semantics Returned if the validity of stored data cannot be ensured. |
| PerErrc::kEncryptionFailed | rollback_semantics Returned if the encryption or decryption of stored data fails. |
| PerErrc::kInvalidSize | rollback_semantics Returned if the new size is larger than the current size. |
| PerErrc::kAuthenticationFailed | rollback_semantics Returned if calculating or checking the MAC of stored data fails. |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_PER_00428- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_PER_00428@rel:R25-11#46e4778f- Content hash
46e4778f- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00428
Status: valid/unmigrated
Version: rel:R25-11#ec5f6be0
Versionshistorie & Revisions (1 transition, 7 revision)
- Current State
valid/unmigrated- Reason
- mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
- Campaign
2026-08-13-status-backfill- Active Version
AUTOSAR/AP/record/SWS_PER_00428@rel:R25-11#ec5f6be0
Recorded Revisions (7):
- R25-11
rel:R25-11#d8a624272026-09-30 - R20-11
rel:R20-11#695302e62026-10-14 - R21-11
rel:R21-11#aae1c4ab2026-10-14 - R22-11
rel:R22-11#3b63355b2026-10-14 - R23-11
rel:R23-11#4766ec6f2026-10-14 - R24-11
rel:R24-11#e7961eae2026-10-14 - R25-11
rel:R25-11#ec5f6be02026-10-14 active
Requirement Text as-of this release:
Curation Decisions:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
|---|---|---|---|---|
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
gemini-3.8-flash-low· 2026-10-13 · الأصل الألماني