Exemplo n.º 1
0
  function testIsPathAbsolute()
  {
    $this->assertTrue(Fs :: isPathAbsolute('c:/var/wow', 'win32'));
    $this->assertTrue(Fs :: isPathAbsolute('/var/wow', 'unix'));

    $this->assertFalse(Fs :: isPathAbsolute(':/var/wow', 'win32'));
    $this->assertFalse(Fs :: isPathAbsolute('/var/wow', 'win32'));
    $this->assertFalse(Fs :: isPathAbsolute('c:/var/wow', 'unix'));

    $this->assertFalse(Fs :: isPathAbsolute('var/wow'));
  }
Exemplo n.º 2
0
 static public function isPathRelative($file_path, $os_type = null)
 {
   return !Fs :: isPathAbsolute($file_path, $os_type);
 }