---
title: "Codeunit 8950 AFS File Client"
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/8950-afs-file-client/
type: codeunit
id: 8950
name: "AFS File Client"
app: "System Application"
namespace: System.Azure.Storage.Files
versions: "23-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/8950-afs-file-client/source/24/ https://jonas-paprotka.de/ref/codeunit/8950-afs-file-client/source/25/ https://jonas-paprotka.de/ref/codeunit/8950-afs-file-client/source/26/ https://jonas-paprotka.de/ref/codeunit/8950-afs-file-client/source/27/ https://jonas-paprotka.de/ref/codeunit/8950-afs-file-client/source/28/ https://jonas-paprotka.de/ref/codeunit/8950-afs-file-client/source/29/"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 8950 AFS File Client

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/8950-afs-file-client/

| | |
| --- | --- |
| App | System Application |
| Namespace | System.Azure.Storage.Files |
| Versions | 23-28 |
| Source file | Azure File Services API/src/AFSFileClient.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| Initialize | (Text, Text, Interface Storage Service Authorization) | - | public | 23-28 | - | - |
| Initialize | (Text, Text, Interface Storage Service Authorization, Enum Storage Service API Version) | - | public | 23-28 | - | - |
| CreateFile | (Text, InStream) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| CreateFile | (Text, InStream, Codeunit AFS Optional Parameters) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| CreateFile | (Text, Integer) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| CreateFile | (Text, Integer, Codeunit AFS Optional Parameters) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| GetFileAsFile | (Text) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| GetFileAsFile | (Text, Codeunit AFS Optional Parameters) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| GetFileAsStream | (Text, var InStream) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| GetFileAsStream | (Text, var InStream, Codeunit AFS Optional Parameters) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| GetFileAsText | (Text, var Text) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| GetFileAsText | (Text, var Text, Codeunit AFS Optional Parameters) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| GetFileMetadata | (Text, var Dictionary) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| GetFileMetadata | (Text, var Dictionary, Codeunit AFS Optional Parameters) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| SetFileMetadata | (Text, Dictionary) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| SetFileMetadata | (Text, var Dictionary, Codeunit AFS Optional Parameters) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| PutFileUI | () | Codeunit AFS Operation Response | public | 23-28 | - | - |
| PutFileUI | (Codeunit AFS Optional Parameters) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| PutFileStream | (Text, var InStream) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| PutFileStream | (Text, var InStream, Codeunit AFS Optional Parameters) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| PutFileText | (Text, Text) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| PutFileText | (Text, Text, Codeunit AFS Optional Parameters) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| DeleteFile | (Text) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| DeleteFile | (Text, Codeunit AFS Optional Parameters) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| ListDirectory | (Text[2048], var Record AFS Directory Content) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| ListDirectory | (Text[2048], var Record AFS Directory Content, Codeunit AFS Optional Parameters) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| ListDirectory | (Text[2048], Boolean, var Record AFS Directory Content) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| ListDirectory | (Text[2048], Boolean, var Record AFS Directory Content, Codeunit AFS Optional Parameters) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| CreateDirectory | (Text) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| CreateDirectory | (Text, Codeunit AFS Optional Parameters) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| DeleteDirectory | (Text) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| DeleteDirectory | (Text, Codeunit AFS Optional Parameters) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| CopyFile | (Text, Text) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| CopyFile | (Text, Text, Codeunit AFS Optional Parameters) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| AbortCopyFile | (Text, Text) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| AbortCopyFile | (Text, Text, Codeunit AFS Optional Parameters) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| ListHandles | (Text, var Record AFS Handle) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| ListHandles | (Text, var Record AFS Handle, Codeunit AFS Optional Parameters) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| RenameFile | (Text, Text) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| RenameFile | (Text, Text, Codeunit AFS Optional Parameters) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| AcquireLease | (Text, Guid, var Guid) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| AcquireLease | (Text, Guid, Codeunit AFS Optional Parameters, var Guid) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| ChangeLease | (Text, Guid, var Guid) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| ChangeLease | (Text, Guid, Codeunit AFS Optional Parameters, var Guid) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| ReleaseLease | (Text, Guid) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| ReleaseLease | (Text, Guid, Codeunit AFS Optional Parameters) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| BreakLease | (Text, Guid) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| BreakLease | (Text, Guid, Codeunit AFS Optional Parameters) | Codeunit AFS Operation Response | public | 23-28 | - | - |
| SetBaseUrl | (Text) | - | public | 26-28 | - | - |

## Source

Symbols: Microsoft.SystemApplication.symbols.63ca2fa4-4f03-4f2b-a480-172fef340d3f, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.
AL source 24: https://github.com/microsoft/BCApps, MIT, releases/24.x at fe14d3e6db00d28df3a69c7bba830813d70794e2.
AL source 25: https://github.com/microsoft/BCApps, MIT, releases/25.x at 68d52c129129c83b2e396a473aaa5b2ce61d2eed.
AL source 26: https://github.com/microsoft/BCApps, MIT, releases/26.x at 78c4acf0d64a8eee157ea80164fa8fc2acffc9eb.
AL source 27: https://github.com/microsoft/BCApps, MIT, releases/27.x at 1749020b4c9445a43e4f7f540e89b7fa76ec25fd.
AL source 28: https://github.com/microsoft/BCApps, MIT, releases/28.x at 740f59156b249f8ed7cba2e28423f03ae7b07233.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at a66254c3b8b5bb1cea290dc8f9d097aec4381153.

Jonas Paprotka, 2026-09-20.
