Get file owner

@param string $file

@return array|int
437727
public static function owner(String $file)
    {
        $file = self::rpath($file);

        if( ! file_exists($file) )
        {
            throw new Exception\FileNotFoundException(NULL, $file);
        }

        $owner = fileowner($file);

        if( function_exists('posix_getpwuid') )
        {
            return posix_getpwuid($owner);
        }
        else
        {
            return $owner;
        }
    }
279463
public function setSourceFile($file)
    {
        $this->currentReaderId = $this->getPdfReaderId($file);
        $this->objectsToCopy[$this->currentReaderId] = [];

        $reader = $this->getPdfReader($this->currentReaderId);
        $this->setMinPdfVersion($reader->getPdfVersion());

        return $reader->getPageCount();
    }
743535
public function getAllowed($file)
    {
        $commands = array();

        foreach ($this->getHandlers() as $id => $command) {
            if ($this->isAllowed($command, $file)) {
                $commands[$id] = $command;
            }
        }

        return $commands;
    }
715046
public static function getAbsFile($file)
    {
        // If already absolute
        if (self::is_absolute($file)) {
            return $file;
        }

        // If path is relative to public folder search there first
        if (self::publicDir()) {
            $path = Path::join(self::publicFolder(), $file);
            if (file_exists($path)) {
                return $path;
            }
        }

        // Default to base folder
        return Path::join(self::baseFolder(), $file);
    }
454792
public function getRelatedFiles($file, $default = [])
    {
        $this->readMetadataFile();

        return isset($this->metadata[$file]['rel']) ? $this->metadata[$file]['rel'] : $default;
    }
453033
public function get($file)
    {
        $target = $this->path . $file;

        if (!is_readable($target)) {
            throw new \Exception("No such content " . $target);
        }

        return file_get_contents($target);
    }
754511
private function FileGetContents($file) {
    $fileObj = new SplFileObject($file, 'r');
    while (!$fileObj->flock(LOCK_EX)) {
      usleep(1);
    }
    $str = $fileObj->fread($fileObj->getSize());
    $fileObj->flock(LOCK_UN);
    return $str;
  }
958390
public function getTargetOf($file)
    {
        $meta = $this->metas->get($file);

        return $this->getTargetFile($meta['url']);
    }
922799
public static function getFile($file) {
		if(is_file($file)) {
			return $file;
		}
		$vendor = dirname(dirname(dirname(__FILE__)));
		$file   = '/'. ltrim($file, '/');
		if (is_file($vendor.$file)) {
			return $vendor.$file;
		}
		$app = dirname(APP_DIR);
		if (is_file($app.$file)) {
			return $app.$file;
		}
		return null;
	}
383031
protected function load_file($file)
	{
		$contents = $this->parse_vars(file_get_contents($file));
		return parse_ini_string($contents, true);
	}
567288
public function locateFile($file)
    {
        $components = $this->parseResource($file);
        if ($components['path']) {
            $path = dirname($components['path']) . '/public/';

            return $path . $components['file'];
        } else {
            return $components['file'];
        }
    }
221291
private function setContaoFile($file)
    {
        if (is_array($file)) {
            return serialize(array_map([__CLASS__, 'setContaoFile'], $file));
        }

        if ($file instanceof FilesModel) {
            return $file->uuid;
        }
        if (Validator::isStringUuid($file)) {
            return StringUtil::uuidToBin($file);
        }
        return $file;
    }
1105728
protected function getFileContents($file)
    {
        // If the file is not readable
        if (!is_readable($file)) {
            throw new RuntimeException(
                sprintf(RuntimeException::INVALID_FILE_STR, $file),
                RuntimeException::INVALID_FILE
            );
        }

        return file_get_contents($file);
    }
1114309
public static function getFileMimeType($file)
    {
        $finfo = finfo_open(FILEINFO_MIME_TYPE);
        if ($finfo) {
            $mime_type = finfo_file($finfo, $file);
            finfo_close($finfo);
            return $mime_type;
        }
        return false;
    }
852008
public static function get(String $file) : stdClass
    {
        $file = self::rpath($file);

        if( ! is_file($file) )
        {
            throw new Exception\FileNotFoundException(NULL, $file);
        }

        return (object)
        [
            'basename'   => self::pathInfo($file, 'basename'),
            'size'       => filesize($file),
            'date'       => filemtime($file),
            'readable'   => is_readable($file),
            'writable'   => is_writable($file),
            'executable' => is_executable($file),
            'permission' => fileperms($file)
        ];
    }
1038361
public function current($file = null)
    {
        $splFileInfo = $file ?: parent::current();

        return $this->transformer->transform($splFileInfo);
    }
1207924
private function loadFile($file)
    {
        if (isset($this->file_languages[$file])) {
            return $this->file_languages[$file];
        } else {
            $f = array();
            if (file_exists($file))
                try {
                    require_once $file;
                    $f = $_L;
                    if ($f == null)
                        $f = array();
                } catch (\Exception $ex) {
                    throw new \OWeb\manage\exceptions\Settings("Failed to load Lanuage file : '$file'", 0, $ex);
                }
            $this->file_languages[$file] = $f;

            return $f;
        }
    }