コード例 #1
0
 /**
  * Returns a {@link WriteMode} for adding a new file.  If a file at the specified path already
  * exists, the new file will be renamed automatically.
  *
  * For example, if you're trying to upload a file to "/Notes/Groceries.txt", but there's
  * already a file there, your file will be written to "/Notes/Groceries (1).txt".
  *
  * You can determine whether your file was renamed by checking the "path" field of the
  * metadata object returned by the API call.
  *
  * @return Dropbox_WriteMode
  */
 public static function add()
 {
     if (self::$addInstance === null) {
         self::$addInstance = new Dropbox_WriteMode(array("overwrite" => "false"));
     }
     return self::$addInstance;
 }