4
* (c) Copyright 2012-2014 Hewlett-Packard Development Company, L.P.
6
* Licensed under the Apache License, Version 2.0 (the "License"); you may
7
* not use this file except in compliance with the License. You may obtain
8
* a copy of the License at
10
* http://www.apache.org/licenses/LICENSE-2.0
12
* Unless required by applicable law or agreed to in writing, software
13
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15
* License for the specific language governing permissions and limitations
19
namespace OpenStack\ObjectStore\v1\Resource;
22
* Represent a subdirectory (subdir) entry.
24
* Depending on the method with which Swift container requests are
25
* executed, Swift may return subdir entries instead of Objects.
27
* Subdirs are used for things that are directory-like.
32
* @var string The path string that this subdir describes
37
* @var string The delimiter used in this path
42
* Create a new subdirectory.
44
* This represents a remote response's tag for a subdirectory.
46
* @param string $path The path string that this subdir describes.
47
* @param string $delimiter The delimiter used in this path.
49
public function __construct($path, $delimiter = '/')
52
$this->delimiter = $delimiter;
58
* The path is delimited using the string returned by delimiter().
60
* @return string The path
62
public function path()
67
* Get the delimiter used by the server.
69
* @return string The value used as a delimiter.
71
public function delimiter()
73
return $this->delimiter;