function testIsAbsoluteTrue()
  {
    $this->assertTrue(Fs :: isAbsolute('/test'));

    if(Sys :: osType() == 'win32')
      $this->assertTrue(Fs :: isAbsolute('c:/test'));
  }
  function _determineOptions()
  {
    if (Sys :: osType() == "win32")
      $this->ext = '.exe';

    $this->_determineReadTypes();
    $this->_determineWriteTypes();

    if (sizeof($this->read_types) == 0)
      $this->library_installed = false;
    else
      $this->library_installed = true;
  }
Example #3
0
  function isPathAbsolute($file_path, $os_type = null)
  {
    if($os_type === null)
      $os_type = Sys :: osType();

    if($os_type == 'win32')
      return preg_match('/^[a-zA-Z]+?:/', $file_path);
    else
    {
      $piece = substr($file_path, 0, 1);
      return ($piece  == '/' ||  $piece  == '\\');
    }
  }
Example #4
0
 static protected function _hasWin32NetPrefix($path)
 {
   if(Sys :: osType() == 'win32' &&  strlen($path) > 2)
   {
     return (substr($path, 0, 2) == self :: WIN32_NET_PREFIX);
   }
   return false;
 }
Example #5
0
 function isMac()
 {
   return Sys :: osType() == 'mac';
 }