Skip to content

Commit 823c495

Browse files
author
Julian Kast
committed
added overwrite property to SdlFile in javaSE
1 parent d8e4b52 commit 823c495

1 file changed

Lines changed: 24 additions & 6 deletions

File tree

  • javaSE/src/main/java/com/smartdevicelink/managers/file/filetypes

javaSE/src/main/java/com/smartdevicelink/managers/file/filetypes/SdlFile.java

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@
3939
* A class representing data to be uploaded to core
4040
*/
4141
public class SdlFile{
42-
private String fileName;
43-
private String filePath;
44-
private byte[] fileData;
45-
private FileType fileType;
46-
private boolean persistentFile;
47-
private boolean isStaticIcon;
42+
private String fileName;
43+
private String filePath;
44+
private byte[] fileData;
45+
private FileType fileType;
46+
private boolean persistentFile;
47+
private boolean isStaticIcon;
48+
// Overwrite property by default is set to true in SdlFile constructors indicating that a file can be overwritten
49+
private boolean overwrite = true;
4850

4951
/**
5052
* Creates a new instance of SdlFile
@@ -185,4 +187,20 @@ public void setStaticIcon(boolean staticIcon) {
185187
public boolean isStaticIcon() {
186188
return isStaticIcon;
187189
}
190+
191+
/**
192+
* Gets the overwrite property for an SdlFile by default its set to true
193+
* @return a boolean value that indicates if a file can be overwritten.
194+
*/
195+
public boolean isOverwrite() {
196+
return overwrite;
197+
}
198+
199+
/**
200+
* Sets the overwrite property for an SdlFile by default its set to true
201+
* @param overwrite a boolean value that indicates if a file can be overwritten
202+
*/
203+
public void setOverwrite(boolean overwrite) {
204+
this.overwrite = overwrite;
205+
}
188206
}

0 commit comments

Comments
 (0)