예제 #1
0
 /**
  * Creates a new Folder entries object
  *
  * @param  var... $args Either an io.Folder, an io.Path or a string
  * @throws lang.IllegalArgumentException
  */
 public function __construct(...$args)
 {
     $this->base = Path::compose($args);
     if ($this->base->isEmpty()) {
         throw new IllegalArgumentException('Cannot create from empty name');
     }
 }
예제 #2
0
 public function relative_as_realpath_with_non_existant_components($components)
 {
     $current = getcwd();
     $this->assertEquals($current, Path::compose($components)->asRealpath($current)->toString());
 }
예제 #3
0
 /** @param io.Path */
 private function tempName()
 {
     return Path::compose([System::tempDir(), md5(uniqid()) . '-xp.json']);
 }