summaryrefslogtreecommitdiffstats
path: root/apps/files_external/3rdparty/icewind/streams/src/PathWrapper.php
blob: 88af7e17b3365e4808ec6a5bfde05c0c30261fc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
/**
 * Copyright (c) 2016 Robin Appelman <icewind@owncloud.com>
 * This file is licensed under the Licensed under the MIT license:
 * http://opensource.org/licenses/MIT
 */

namespace Icewind\Streams;

/**
 * A string-like object that maps to an existing stream when opened
 */
class PathWrapper extends NullWrapper {
	/**
	 * @param resource $source
	 * @return Path|string
	 */
	public static function getPath($source) {
		return new Path(__CLASS__, [
			'null' => [
				'source' => $source
			]
		]);
	}
}