Package 

Enum CreateMode

  • 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_EXISTS

      If the file already exists, then return null.

      CREATE_NEW
      • If a conflict is raised, then create a new file/folder with auto-incremented file name, e.g. My Video (1).mp4 and My Documents (2).

      • If folder A already exists under this folder and you're trying to create A, then return A (1).

      • If folder A/B already exists under this folder and you're trying to create A/B, then return A (1)/B.

      REPLACE

      For 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.

      REUSE

      For 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/B already exists under this folder and you're trying to create A/B, then return A/B.

      • If folder A/B already exists under this folder and you're trying to create A/B/C, then create folder C and return A/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 String getName()
      final Integer getOrdinal()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait