public bool Delete(string name) { if (name.Split(new[] { '/', '\\' }, StringSplitOptions.RemoveEmptyEntries).Length == 1) { throw ClientException(D.UNABE_TO_DELETE_SYSTEM_DIRECTORY); } try { IIOContext io = IOContext.Current; string path = io.TranslateLocalPath(name); return(io.Delete(path)); } catch (CustomException e) { throw ClientException(e.FriendlyMessage); } catch (ArgumentException) { throw ClientException(D.INVALID_PATH + ": " + name); } catch (Exception e) { HandleException(e, "Delete"); throw ClientException(D.UNEXPECTED_ERROR_OCCURED); } }
public void ClearPrivate() { try { IIOContext io = IOContext.Current; io.Delete(Path.Combine(_io.LocalStorage, io.PrivateDirectory)); } catch (Exception e) { HandleException(e, "ClearPrivate"); } }