/// <summary> /// Delete the QiniuFile with mac. /// </summary> /// <param name="mac">Mac.</param> public bool Delete(MAC mac = null) { if (mac == null) { mac = new MAC(); } string url = string.Format("{0}/{1}/{2}", Config.RS_HOST, "delete", Base64URLSafe.Encode(this.bucketName + ":" + this.key)); try { using (QiniuWebClient client = new QiniuWebClient()) { client.Call(url, mac); return(true); } } catch (WebException e) { throw new QiniuWebException(e); } catch (Exception e) { throw e; } }
/// <summary> /// Stat the QiniuFile with mac. /// </summary> /// <param name="mac">Mac.</param> public QiniuFileInfo Stat(MAC mac = null) { if (mac == null) { mac = new MAC(); } string url = string.Format("{0}/{1}/{2}", Config.RS_HOST, "stat", Base64URLSafe.Encode(this.bucketName + ":" + this.key)); try { using (QiniuWebClient client = new QiniuWebClient()) { string result = client.Call(url, mac); return(GetQiniuEntry(result)); } } catch (WebException e) { throw new QiniuWebException(e); }catch (Exception e) { throw e; } }