फ़ंक्शन DeleteFile [SWS_PER_00111] Upstream: RS_PER_00001, RS_PER_00004, RS_AP_00119, RS_AP_00120, RS_ AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159
ara::core::Result< void > DeleteFile (ara::core::StringView fileName) noexcept;
Deletes a file from this File Storage. This operation will fail with kResourceBusy when the file is currently open.
क्लास ara::per::FileStorage का सिंक्रोनस मेथड DeleteFile किसी फ़ाइल को उसके नाम (fileName) के आधार पर फ़ाइल स्टोरेज से हटाता है [SWS_PER_00111]। यह पहचानकर्ता कॉन्फ़िगर किए गए PersistencyFile.fileName से मेल खा सकता है [SWS_PER_00111]। इस कॉल को noexcept के रूप में निर्दिष्ट किया गया है, इसे अपवाद-सुरक्षित तथा थ्रेड-सुरक्षित माना जाता है और यह परिणाम ara::core::Result<void> के माध्यम से रिपोर्ट करता है [SWS_PER_00111]।
कॉल करने से पहले, लक्षित फ़ाइल पर सभी सक्रिय एक्सेस समाप्त होने चाहिए। यदि फ़ाइल वर्तमान में खुली है, तो हटाने की प्रक्रिया त्रुटि PerErrc::kResourceBusy के साथ विफल हो जाती है [SWS_PER_00111]। इसलिए एप्लिकेशन को यह सुनिश्चित करना चाहिए कि OpenFileReadWrite [SWS_PER_00113], OpenFileReadOnly [SWS_PER_00114] या OpenFileWriteOnly [SWS_PER_00115] के माध्यम से पहले बनाए गए UniqueHandle-इंस्टेंस अपने स्कोप से बाहर निकल चुके हों, जिससे फ़ाइल बंद हो जाती है। इसी प्रकार, समान फ़ाइल नाम के लिए RecoverFile [SWS_PER_00337] या ResetFile [SWS_PER_00338] का समानांतर निष्पादन PerErrc::kResourceBusy [SWS_PER_00111] का कारण बनता है।
त्रुटि की स्थिति में, लौटाया गया Result-प्रकार विशिष्ट त्रुटि कारण प्रदान करता है [SWS_PER_00111]:
PerErrc::kFileNotFound: निर्दिष्ट फ़ाइल, फ़ाइल स्टोरेज में मौजूद नहीं है [SWS_PER_00111]।PerErrc::kIllegalWriteAccess: फ़ाइल स्टोरेज केवल-पढ़ने के लिए (read-only) कॉन्फ़िगर किया गया है [SWS_PER_00111]।PerErrc::kPhysicalStorageFailure: भौतिक स्टोरेज माध्यम तक एक्सेस विफल हो जाता है (रोलबैक सिमेंटिक्स के बिना) [SWS_PER_00111]।PerErrc::kIntegrityCorrupted,PerErrc::kEncryptionFailedयाPerErrc::kAuthenticationFailed: संरचनात्मक अखंडता, एन्क्रिप्शन/डिक्रिप्शन या MAC सत्यापन में त्रुटियाँ (प्रत्येक रोलबैक सिमेंटिक्स के साथ) और साथ ही निर्माता-विशिष्ट त्रुटियाँ [SWS_PER_00111]।
यह टेक्स्ट एक AI द्वारा जनरेट किया गया था और एक मार्गदर्शन के रूप में कार्य करता है। केवल AUTOSAR दस्तावेज़ीकरण के विनिर्देश ही बाध्यकारी हैं।
इम्प्लीमेंटर गाइड जल्द आएगी (जटिलता I2)
| Header-Datei | #include "ara/per/file_storage.h" |
|---|---|
| Scope | class ara::per::FileStorage |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | thread-safe |
Parameter (in)
| Parameter | Beschreibung |
|---|---|
| fileName | File name of the file. May correspond to the PersistencyFile.file Name of a configured 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 |
|---|---|
| PerErrc::kIllegalWriteAccess | rollback_semantics Returned if the File Storage is configured as read-only. |
| PerErrc::kPhysicalStorageFailure | no_rollback_semantics Returned if access to the physical storage fails. |
| PerErrc::kIntegrityCorrupted | rollback_semantics Returned if stored data cannot be written because the structural integrity is corrupted. |
| PerErrc::kEncryptionFailed | rollback_semantics Returned if the encryption or decryption of stored data fails. |
| PerErrc::kResourceBusy | rollback_semantics Returned if the file is open, or if RecoverFile or ResetFile with the same file name is currently being executed. |
| PerErrc::kFileNotFound | rollback_semantics Returned if the provided file does not exist in the File Storage. |
| 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_00111- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_PER_00111@rel:R25-11#74da6800- Content hash
74da6800- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00111
Status: valid/unmigrated
Version: rel:R25-11#54be3f24
Versionshistorie & Revisions (1 transition, 8 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_00111@rel:R25-11#54be3f24
Recorded Revisions (8):
- R25-11
rel:R25-11#9014bbf32026-09-30 - R19-11
rel:R19-11#878a9ae32026-10-14 - R20-11
rel:R20-11#c8f140db2026-10-14 - R21-11
rel:R21-11#35984aa22026-10-14 - R22-11
rel:R22-11#86df5bb02026-10-14 - R23-11
rel:R23-11#a507e2692026-10-14 - R24-11
rel:R24-11#5c96fd1e2026-10-14 - R25-11
rel:R25-11#54be3f242026-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 · जर्मन मूल