PHPackages                             dreamfactory/php-webhdfs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. dreamfactory/php-webhdfs

ActiveLibrary[File &amp; Storage](/categories/file-storage)

dreamfactory/php-webhdfs
========================

PHP WebHDFS, forked from https://github.com/simpleenergy/php-WebHDFS

1.1.1(3y ago)06.5kMITPHPPHP &gt;=5.4.0

Since Oct 15Pushed 3y agoCompare

[ Source](https://github.com/dreamfactorysoftware/php-WebHDFS)[ Packagist](https://packagist.org/packages/dreamfactory/php-webhdfs)[ RSS](/packages/dreamfactory-php-webhdfs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (7)Used By (0)

php-WebHDFS
===========

[](#php-webhdfs)

Description
-----------

[](#description)

php-WebHDFS is a PHP client for [WebHDFS](http://hadoop.apache.org/docs/r2.0.3-alpha/hadoop-project-dist/hadoop-hdfs/WebHDFS.html).

Dependencies
------------

[](#dependencies)

- [PHP](http://php.net/)
- [cURL](http://curl.haxx.se/)

Install via composer
--------------------

[](#install-via-composer)

```
composer require dreamfactory/php-webhdfs
```

Usage
-----

[](#usage)

- [File and Directory Operations](#file-and-directory-operations)
    - [Create and Write to a File](#create-and-write-to-a-file)
    - [Create and write content directly to a file](#create-and-write-content-directly-to-a-file)
    - [Append to a File](#append-to-a-file)
    - [Concat File(s)](#concat-files)
    - [Open and Read a File](#open-and-read-a-file)
    - [Make a Directory](#make-a-directory)
    - [Create a Symbolic Link](#create-a-symbolic-link)
    - [Rename a File/Directory](#rename-a-filedirectory)
    - [Delete a File/Directory](#delete-a-filedirectory)
    - [Status of a File/Directory](#status-of-a-filedirectory)
    - [List a Directory](#list-a-directory)
- [Other File System Operations](#other-file-system-operations)
    - [Get Content Summary of a Directory](#get-content-summary-of-a-directory)
    - [Get File Checksum](#get-file-checksum)
    - [Get Home Directory](#get-home-directory)
    - [Set Permission](#set-permission)
    - [Set Owner](#set-owner)
    - [Set Replication Factor](#set-replication-factor)
    - [Set Access or Modification Time](#set-access-or-modification-time)

### File and Directory Operations

[](#file-and-directory-operations)

#### Create and Write to a File

[](#create-and-write-to-a-file)

```
hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->create('user/hadoop-username/new-file.txt', 'local-file.txt');
```

#### Create and write content directly to a file

[](#create-and-write-content-directly-to-a-file)

```
hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->createWithData('user/hadoop-username/new-file.txt', 'content');
```

#### Append to a File

[](#append-to-a-file)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->append('user/hadoop-username/file-to-append-to.txt', 'local-file.txt');
```

#### Concat File(s)

[](#concat-files)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->concat('user/hadoop-username/concatenated-file.txt', '/test/file1,/test/file2,/test/file3');
```

#### Open and Read a File

[](#open-and-read-a-file)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$response = $hdfs->open('user/hadoop-username/file.txt');
```

#### Make a Directory

[](#make-a-directory)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->mkdirs('user/hadoop-username/new/directory/structure');
```

#### Create a Symbolic Link

[](#create-a-symbolic-link)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->createSymLink('user/hadoop-username/file.txt', '/user/hadoop-username/symlink-to-file.txt');
```

#### Rename a File/Directory

[](#rename-a-filedirectory)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->rename('user/hadoop-username/file.txt', '/user/hadoop-username/renamed-file.txt');
```

#### Delete a File/Directory

[](#delete-a-filedirectory)

```
hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->delete('user/hadoop-username/file.txt');
```

#### Status of a File/Directory

[](#status-of-a-filedirectory)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$response = $hdfs->getFileStatus('user/hadoop-username/file.txt');
```

#### List a Directory

[](#list-a-directory)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$response = $hdfs->listStatus('user/hadoop-username/');
```

### Other File System Operations

[](#other-file-system-operations)

#### Get Content Summary of a Directory

[](#get-content-summary-of-a-directory)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$response = $hdfs->getContentSummary('user/hadoop-username/');
```

#### Get File Checksum

[](#get-file-checksum)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$response = $hdfs->getFileChecksum('user/hadoop-username/file.txt');
```

#### Get Home Directory

[](#get-home-directory)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$response = $hdfs->getHomeDirectory();
```

#### Set Permission

[](#set-permission)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->setPermission('user/hadoop-username/file.txt', '777');
```

#### Set Owner

[](#set-owner)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->setOwner('user/hadoop-username/file.txt', 'other-user');
```

#### Set Replication Factor

[](#set-replication-factor)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$hdfs->setReplication('user/hadoop-username/file.txt', '2');
```

#### Set Access or Modification Time

[](#set-access-or-modification-time)

```
$hdfs = new WebHDFS('mynamenode.hadoop.com', '50070', 'hadoop-username');
$response = $hdfs->setTimes('user/hadoop-username/file.txt');
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~319 days

Recently: every ~350 days

Total

6

Last Release

1172d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a6d25412f9819bf51eaf3cb005d1f1239f2b81081c51018240d132b98e6ad2b8?d=identicon)[dreamfactory](/maintainers/dreamfactory)

---

Top Contributors

[![xaviered](https://avatars.githubusercontent.com/u/1844174?v=4)](https://github.com/xaviered "xaviered (16 commits)")[![jacobko](https://avatars.githubusercontent.com/u/1041097?v=4)](https://github.com/jacobko "jacobko (6 commits)")[![volodymyrpoli](https://avatars.githubusercontent.com/u/48056356?v=4)](https://github.com/volodymyrpoli "volodymyrpoli (5 commits)")[![Thanavath](https://avatars.githubusercontent.com/u/765961?v=4)](https://github.com/Thanavath "Thanavath (3 commits)")[![yosshi](https://avatars.githubusercontent.com/u/41183?v=4)](https://github.com/yosshi "yosshi (1 commits)")[![dshap](https://avatars.githubusercontent.com/u/283225?v=4)](https://github.com/dshap "dshap (1 commits)")[![tranch](https://avatars.githubusercontent.com/u/5999732?v=4)](https://github.com/tranch "tranch (1 commits)")[![daniilly](https://avatars.githubusercontent.com/u/117088089?v=4)](https://github.com/daniilly "daniilly (1 commits)")

### Embed Badge

![Health badge](/badges/dreamfactory-php-webhdfs/health.svg)

```
[![Health](https://phpackages.com/badges/dreamfactory-php-webhdfs/health.svg)](https://phpackages.com/packages/dreamfactory-php-webhdfs)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
