public static function put($path, $data = null, $flags = null)
    {
        $path = self::resolve($path);

        if ($path === false) {
            return false;
        }

        $data = is_numeric($data) === false && !$data ? '' : $data;

        if (is_file($path) && !$data) {
            return true;
        }

        $flags = $flags ? $flags : FILE_APPEND|LOCK_EX;

        return self::createFolder(dirname($path)) && file_put_contents($path, $data, $flags) !== false;
    }