---
id: object/codeunit/8951
type: object
title: Codeunit 8951 "AFS File Client Impl."
summary: Codeunit 8951 "AFS File Client Impl." in System Application (System.Azure.Storage.Files). 24 public procedures, 1 events. Present since at least BC23, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: null
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 5c407250afe86c0e95f441e248902c565b836572bd8be310e044b109b25813b1
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Azure%20File%20Services%20API/src/AFSFileClientImpl.Codeunit.al
    title: src/System Application/App/Azure File Services API/src/AFSFileClientImpl.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 8951
name: AFS File Client Impl.
namespace: System.Azure.Storage.Files
app: System Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 32
  events: 1
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 10
  called_by: 1
  implements: 0
---

# Codeunit 8951 "AFS File Client Impl."

> Codeunit 8951 "AFS File Client Impl." in System Application (System.Azure.Storage.Files). 24 public procedures, 1 events. Present since at least BC23, still in BC30.

System Application · System.Azure.Storage.Files · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Azure%20File%20Services%20API/src/AFSFileClientImpl.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Internal |

## Events published

- `OnPutFileRangesAfterPutOperation(ResponseIndex: Integer; var AFSOperationResponse: Codeunit "AFS Operation Response")` (integration)

## Procedures

- `Initialize(StorageAccountName: Text; FileShare: Text; Path: Text; Authorization: Interface "Storage Service Authorization"; ApiVersion: Enum "Storage Service API Version")`
- `SetBaseUrl(BaseUrl: Text)`
- `CreateDirectory(DirectoryPath: Text; AFSOptionalParameters: Codeunit "AFS Optional Parameters"): Codeunit "AFS Operation Response"`
- `DeleteDirectory(DirectoryPath: Text; AFSOptionalParameters: Codeunit "AFS Optional Parameters"): Codeunit "AFS Operation Response"`
- `ListDirectory(DirectoryPath: Text[2048]; var AFSDirectoryContent: Record "AFS Directory Content"; PreserveDirectoryContent: Boolean; AFSOptionalParameters: Codeunit "AFS Optional Parameters"): Codeunit "AFS Operation Response"`
- `ListFileHandles(Path: Text; var AFSHandle: Record "AFS Handle"; AFSOptionalParameters: Codeunit "AFS Optional Parameters"): Codeunit "AFS Operation Response"`
- `RenameFile(SourceFilePath: Text; DestinationFilePath: Text; AFSOptionalParameters: Codeunit "AFS Optional Parameters"): Codeunit "AFS Operation Response"`
- `CreateFile(FilePath: Text; InStream: InStream; AFSOptionalParameters: Codeunit "AFS Optional Parameters"): Codeunit "AFS Operation Response"`
- `CreateFile(FilePath: Text; FileSize: Integer; AFSOptionalParameters: Codeunit "AFS Optional Parameters"): Codeunit "AFS Operation Response"`
- `GetFileAsFile(FilePath: Text; AFSOptionalParameters: Codeunit "AFS Optional Parameters"): Codeunit "AFS Operation Response"`
- `GetFileAsStream(FilePath: Text; var TargetInStream: InStream; AFSOptionalParameters: Codeunit "AFS Optional Parameters"): Codeunit "AFS Operation Response"`
- `GetFileAsText(FilePath: Text; var TargetText: Text; AFSOptionalParameters: Codeunit "AFS Optional Parameters"): Codeunit "AFS Operation Response"`
- `GetFileMetadata(FilePath: Text; var TargetMetadata: Dictionary of [Text, Text]; AFSOptionalParameters: Codeunit "AFS Optional Parameters"): Codeunit "AFS Operation Response"`
- `SetFileMetadata(FilePath: Text; Metadata: Dictionary of [Text, Text]; AFSOptionalParameters: Codeunit "AFS Optional Parameters"): Codeunit "AFS Operation Response"`
- `PutFileUI(AFSOptionalParameters: Codeunit "AFS Optional Parameters"): Codeunit "AFS Operation Response"`
- `PutFileStream(FilePath: Text; var SourceInStream: InStream; AFSOptionalParameters: Codeunit "AFS Optional Parameters"): Codeunit "AFS Operation Response"`
- `PutFileText(FilePath: Text; SourceText: Text; AFSOptionalParameters: Codeunit "AFS Optional Parameters"): Codeunit "AFS Operation Response"`
- `DeleteFile(FilePath: Text; AFSOptionalParameters: Codeunit "AFS Optional Parameters"): Codeunit "AFS Operation Response"`
- `CopyFile(SourceFileURI: Text; DestinationFilePath: Text; AFSOptionalParameters: Codeunit "AFS Optional Parameters"): Codeunit "AFS Operation Response"`
- `AbortCopyFile(DestinationFilePath: Text; CopyID: Text; AFSOptionalParameters: Codeunit "AFS Optional Parameters"): Codeunit "AFS Operation Response"`
- `FileAcquireLease(FilePath: Text; AFSOptionalParameters: Codeunit "AFS Optional Parameters"; ProposedLeaseId: Guid; var LeaseId: Guid): Codeunit "AFS Operation Response"`
- `FileReleaseLease(FilePath: Text; AFSOptionalParameters: Codeunit "AFS Optional Parameters"; LeaseId: Guid): Codeunit "AFS Operation Response"`
- `FileBreakLease(FilePath: Text; AFSOptionalParameters: Codeunit "AFS Optional Parameters"; LeaseId: Guid): Codeunit "AFS Operation Response"`
- `FileChangeLease(FilePath: Text; AFSOptionalParameters: Codeunit "AFS Optional Parameters"; var LeaseId: Guid; ProposedLeaseId: Guid): Codeunit "AFS Operation Response"`

Plus 7 local procedures.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 8952 "AFS Operation Payload Impl."](../codeunit/8952.md) (84 calls: `AbortCopyFile → AddRequestHeader`, `AbortCopyFile → AddUriParameter`, `AbortCopyFile → GetPath`, …)
- [Codeunit 8959 "AFS Operation Response"](../codeunit/8959.md) (46 calls: `AbortCopyFile → GetError`, `AbortCopyFile → IsSuccessful`, `AcquireLease → GetHeaderValueFromResponseHeaders`, …)
- [Codeunit 8711 "Telemetry"](../codeunit/8711.md) (21 calls: `AbortCopyFile → LogMessage`, `CopyFile → LogMessage`, `CreateDirectory → LogMessage`, …)
- [Codeunit 8954 "AFS Web Request Helper"](../codeunit/8954.md) (17 calls: `AbortCopyFile → PutOperation`, `AcquireLease → PutOperation`, `BreakLease → PutOperation`, …)
- [Codeunit 8956 "AFS Optional Parameters"](../codeunit/8956.md) (10 calls: `AcquireLease → LeaseAction`, `AcquireLease → LeaseDuration`, `AcquireLease → ProposedLeaseId`, …)
- [Codeunit 8960 "XML Utility Impl."](../codeunit/8960.md) (7 calls: `ListDirectory → CreateDirectoryContentNodeListFromResponse`, `ListDirectory → DirectoryContentNodeListToTempRecord`, `ListDirectory → GetDirectoryPathFromResponse`, …)
- [Codeunit 4100 "Temp Blob"](../codeunit/4100.md) (4 calls: `PutFile → CreateInStream`, `PutFile → CreateOutStream`, `PutFileRanges → CreateInStream`, …)
- [Codeunit 8953 "AFS HttpContent Helper"](../codeunit/8953.md) (4 calls: `CreateFile → GetContentLength`, `PutFileRanges → AddFilePutContentHeaders`, `PutFileRanges → GetContentLength`, …)
- [Codeunit 8955 "AFS Format Helper"](../codeunit/8955.md) (2 calls: `AcquireLease → RemoveCurlyBracketsFromString`, `ChangeLease → RemoveCurlyBracketsFromString`)
- [Codeunit 8958 "AFS HttpHeader Helper"](../codeunit/8958.md) (1 call: `GetFileMetadata → GetMetadataHeaders`)

## Called by

- [Codeunit 8950 "AFS File Client"](../codeunit/8950.md) (23 calls: `AbortCopyFile → AbortCopyFile`, `AcquireLease → FileAcquireLease`, `BreakLease → FileBreakLease`, …)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: none

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "AFS File Client Impl.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
