> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ADLS Gen2 directory files

> Retain conditionally read files from a Data Lake Storage Gen2 directory.

Bind one filesystem and directory on an Azure Data Lake Storage Gen2
hierarchical namespace account. The app enumerates files recursively.
Follow the same mount, source controls, and 1 MiB File and 24 KiB range
limits as the S3 source. Pass the receiver below to the app as `provider`. For protected content, pass the declared label as the binder's last argument and as the app's `data`.
[Object storage mount and controls](https://docs.bijection.com/integrations/native-s3.md).

```ts bijection/app.ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
import { app, label, secret } from "@bijectionhq/bijection";
import objects, { adlsDirectory } from "@bijectionhq/app-objects";

const archive = label();
const token = secret();
const directory = adlsDirectory({
  account: "examplelake",
  filesystem: "incoming",
  directory: "exports/daily",
}, { kind: "bearer", secret: token }, archive);

export default app({ archive, token, directory, lake: objects({ data: archive, provider: directory }) });
```

Seal a Microsoft Entra token for Azure Storage in the `secret()` the binder takes, or configure the existing OAuth2 client credentials flow.
Grant directory traversal, listing and file reads within the installed
scope. An empty `directory` selects the filesystem root. A named directory
uses a literal path with no leading or trailing slash.
[Azure Path List](https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/list).

ADLS exposes live paths. The app retains the path and strong ETag as an
observed version, sends `If-Match` on every range, and validates the returned
ETag and byte range. If the path changes or disappears before retrieval
finishes, the source records a gap and the installer can reset from the
new enumeration. This mode records files it actually read and makes no
claim about earlier remote versions or deletions.
[Azure Path Read](https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/read).

The app bundle requires the bundled parser artifact. Configure `source.initialize`
to publish CSV or JSON records alongside retained Files.
[CSV and JSON object records](https://docs.bijection.com/integrations/native-object-records.md).

## Put an object

Bind `adlsDirectoryWriter({ account, filesystem, directory }, auth, label)`
and pass it to the objects app as `writer`. Follow the
[object write command](https://docs.bijection.com/integrations/native-s3.md#put-an-object) for the key,
inline payload, contract and evidence API.

The writer binds the filesystem’s Blob endpoint and requires the key
to be under the installed directory. Include the directory in the submitted
key. HTTP 201 acknowledges the block blob write and the app retains the ETag
when present. The account must permit Blob API writes to the filesystem.
[Provider API](https://learn.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-known-issues)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.