/** @ignore */ public function __construct(MOXMAN_Vfs_Local_File $file, $mode) { $this->file = $file; $this->fp = @fopen($file->getInternalPath(), $mode); if (!$this->fp) { throw new MOXMAN_Exception("Could not open file stream for file."); } }
public static function chmod(MOXMAN_Vfs_Local_File $file) { if ($file->isFile()) { $mask = $file->getConfig()->get("filesystem.local.file_mask"); } else { $mask = $file->getConfig()->get("filesystem.local.dir_mask"); } if ($mask && DIRECTORY_SEPARATOR == "/") { if ($mask[0] != '0') { throw new MOXMAN_Exception("Invalid bitmask value use octal string."); } @chmod($file->getInternalPath(), octdec($mask)); } }