@Test public void testDeleteFile() throws TranslatorException { Assert.assertFalse(s3Connection.remove("sl")); }
@Override public boolean remove(String s) throws TranslatorException { try{ if (!s3Client.doesObjectExist(s3Config.getBucket(), s)) { return false; } s3Client.deleteObject(s3Config.getBucket(), s); } catch (SdkClientException e){ return false; } return true; }
S3Connection implements VirtualFileConnection { @Override public boolean remove(String s) throws TranslatorException { try{ if (!s3Client.doesObjectExist(s3Config.getBucket(), s)) { return false; } s3Client.deleteObject(s3Config.getBucket(), s); } catch (SdkClientException e){ return false; } return true; } }
S3Connection implements VirtualFileConnection { @Override public boolean remove(String s) throws TranslatorException { try{ if (!s3Client.doesObjectExist(s3Config.getBucket(), s)) { return false; } s3Client.deleteObject(s3Config.getBucket(), s); } catch (SdkClientException e){ return false; } return true; } S3Connection(S3Configuration s3Config, AmazonS3 s3Client); }
S3Connection implements VirtualFileConnection { @Override public boolean remove(String s) throws TranslatorException { try{ if (!s3Client.doesObjectExist(s3Config.getBucket(), s)) { return false; } s3Client.deleteObject(s3Config.getBucket(), s); } catch (SdkClientException e){ return false; } return true; } S3Connection(S3Configuration s3Config, AmazonS3 s3Client); @Override VirtualFile[] getFiles(String s); @Override void add(InputStream in, String path); @Override void add(InputStream inputStream, String s, FileMetadata fileMetadata); @Override boolean remove(String s); @Override void close(); }
S3Connection implements VirtualFileConnection { @Override public boolean remove(String s) throws TranslatorException { try{ if (!s3Client.doesObjectExist(s3Config.getBucket(), s)) { return false; } s3Client.deleteObject(s3Config.getBucket(), s); } catch (SdkClientException e){ return false; } return true; } S3Connection(S3Configuration s3Config, AmazonS3 s3Client); @Override VirtualFile[] getFiles(String s); @Override void add(InputStream in, String path); @Override void add(InputStream inputStream, String s, FileMetadata fileMetadata); @Override boolean remove(String s); @Override void close();  }