-
- All Implemented Interfaces:
-
java.io.Serializable,kotlin.Comparable
public enum CreateMode extends Enum<CreateMode>
Created on 03/06/21
-
-
Enum Constant Summary
Enum Constants Enum Constant Description SKIP_IF_EXISTSIf the file already exists, then return null.
CREATE_NEWIf a conflict is raised, then create a new file/folder with auto-incremented file name, e.g.
My Video (1).mp4andMy Documents (2).If folder
Aalready exists under this folder and you're trying to createA, then returnA (1).If folder
A/Balready exists under this folder and you're trying to createA/B, then returnA (1)/B.
REPLACEFor folder case:
If the conflicted file is a file, then delete it and create a new directory.
If the conflicted file is a folder, then delete all of its children.
For file case:
If the conflicted file is a folder, then delete it and create a new file.
If the conflicted file is a file, then recreate it.
REUSEFor folder case:
If the conflicted file is a file, then return
null.If the conflicted file is a folder, then use this directory.
If folder
A/Balready exists under this folder and you're trying to createA/B, then returnA/B.If folder
A/Balready exists under this folder and you're trying to createA/B/C, then create folderCand returnA/B/C.
For file case:
If the conflicted file is a folder, then return
null.If the conflicted file is a file, then return this.
-
Method Summary
Modifier and Type Method Description final StringgetName()final IntegergetOrdinal()-
-
Method Detail
-
getOrdinal
final Integer getOrdinal()
-
-
-
-