Пример #1
0
  /**
   * creates a new folder in a webdav server using the current domain
   *
   * @param newPath The path relative to the domain for the new folder
   * @return The complete path of the folder created or null if not created
   */
  public String createFolder(String newPath) {
    String result = null;

    try {
      if (_isLocal) {
        File tmpFile = new File(_rootFile.getCanonicalPath() + File.separatorChar + newPath);
        if (tmpFile.mkdirs()) result = tmpFile.getCanonicalPath();
      } else {
        result = _remote.createFolder(_domain, newPath);
      }
    } catch (Exception ex) {
      ex.printStackTrace();
    }
    //    System.out.println(_domain+result);
    return result;
  }