Uploads a VNFPackage to the NFVO.

@param filePath the path to the tar file representing the VNFPackage
@return the uploaded VNFPackage
@throws SDKException if the request fails
488993
@Help(help = "Create a VNFPackage by uploading a tar file")
  public VNFPackage create(String filePath) throws SDKException {
    log.debug("Start uploading a VNFPackage using the tar at path " + filePath);
    File f = new File(filePath);
    if (f == null || !f.exists()) {
      log.error("No package: " + f.getName() + " found!");
      throw new SDKException(
          "No package: " + f.getName() + " found!",
          new StackTraceElement[0],
          "File " + filePath + " not existing");
    }
    return requestPostPackage(f);
  }
211046
public static boolean createFolder(String folderPath) {
        if (!StringUtils.isEmpty(folderPath)) {
            File folder = new File(folderPath);
            return createFolder(folder);
        }
        return false;
    }
1354404
public synchronized VNFPackageAgent getVNFPackageAgent() {
    if (this.vnfPackageAgent == null) {
      if (isService) {
        this.vnfPackageAgent =
            new VNFPackageAgent(
                this.serviceName,
                this.projectId,
                this.sslEnabled,
                this.nfvoIp,
                this.nfvoPort,
                this.version,
                this.serviceKey);
      } else {
        this.vnfPackageAgent =
            new VNFPackageAgent(
                this.username,
                this.password,
                this.projectId,
                this.sslEnabled,
                this.nfvoIp,
                this.nfvoPort,
                this.version);
      }
    }
    return this.vnfPackageAgent;
  }
1201453
public static void addFolder(Path p, JsonArray succeeded, JsonArray failed) throws IOException {
    FileSystem fs = FileSystem.get(p.toUri(), PersistHdfs.CONF);
    if(!fs.exists(p)){
      JsonObject o = new JsonObject();
      o.addProperty(Constants.FILE, p.toString());
      o.addProperty(Constants.ERROR, "Path does not exist!");
      failed.add(o);
      return;
    }
    addFolder(fs, p, succeeded, failed);
  }
958582
public static Structure readFromFile(Path filePath) throws IOException {
		// Get the reader - this is the bit that people need to implement.
		MmtfStructureReader mmtfStructureReader = new MmtfStructureReader();
		// Do the inflation
		new StructureDataToAdapter(new GenericDecoder(ReaderUtils.getDataFromFile(filePath)), mmtfStructureReader);
		// Get the structue
		return mmtfStructureReader.getStructure();
	}
686625
public @CheckForNull FilePath createPath(String absolutePath) {
        VirtualChannel ch = getChannel();
        if(ch==null)    return null;    // offline
        return new FilePath(ch,absolutePath);
    }
479712
public static boolean createFile(String filePath) {
        if (!StringUtils.isEmpty(filePath)) {
            File file = new File(filePath);
            return createFile(file);
        }
        return false;
    }
727228
protected Nfs3File newFile(String path, LinkTracker<Nfs3, Nfs3File> linkTracker) throws IOException {
        return new Nfs3File(getNfs(), path, linkTracker);
    }
633284
public static Network loadNetwork(String networkPath)
            throws ShanksException {
        Network net = new Network();
        net.readFile(networkPath);
        net.setBayesianAlgorithm(BayesianAlgorithmType.Lauritzen);
        net.updateBeliefs();
        return net;
    }
888675
public void loadFolder(String folderPath) {
		// Get the file path.
		File path = null;
		if(folderPath != null && folderPath.length() > 0) {
			path = new File(folderPath);
		}
		
		this.loadFolder(path);
	}
1296048
public static NFSFileVec make(File f, Futures fs) {
    if( !f.exists() ) throw new IllegalArgumentException("File not found: "+f.toString());
    long size = f.length();
    Key k = Vec.newKey(PersistNFS.decodeFile(f));
    // Insert the top-level FileVec key into the store
    NFSFileVec nfs = new NFSFileVec(k,size);
    DKV.put(k,nfs,fs);
    return nfs;
  }
802292
private function getFilePath($filePath = null)
    {
        $filePath = $filePath ?? $this->filePath ?? null;

        if (null === $filePath) {
            throw NoFilePathGivenException::import();
        }

        return $filePath;
    }
804156
public static void setInitFilePath(String filePath) {
		filePath=getPropertiesFilePath(filePath);
		
		if (staticFileProperties == null) {
			staticFileProperties=new FileProperties(filePath);
		} else {
			staticFileProperties.setInitFilePath(filePath);
		}
	}
1238732
public static byte[] md5FileToByte(String filePath) {
        File file = StringKit.isBlank(filePath) ? null : new File(filePath);
        return md5FileToByte(file);
    }
394257
public void setFilePath(String filePath)
    {
        //create a new file
        File fileInstance=null;
        if(filePath!=null)
        {
            fileInstance=new File(filePath);
        }
        
        //set file
        this.setFile(fileInstance);
    }
271792
public static Properties loadProperties(String filePath) throws MnoConfigurationException {
		Properties properties = new Properties();
		InputStream input = getInputStreamFromClassPathOrFile(filePath);
		try {
			properties.load(input);
		} catch (IOException e) {
			throw new MnoConfigurationException("Could not load properties file: " + filePath, e);
		} finally {
			IOUtils.closeQuietly(input);
		}
		return properties;
	}
887915
public function createReleaseFolder($storagePath, $releaseName)
    {
        $subDirName = File::directories($storagePath);
        $directories = File::directories($subDirName[0]);

        File::makeDirectory($storagePath.'/'.$releaseName);

        foreach ($directories as $directory) { /* @var string $directory */
            File::moveDirectory($directory, $storagePath.'/'.$releaseName.'/'.File::name($directory));
        }

        $files = File::allFiles($subDirName[0], true);
        foreach ($files as $file) { /* @var \SplFileInfo $file */
            File::move($file->getRealPath(), $storagePath.'/'.$releaseName.'/'.$file->getFilename());
        }

        File::deleteDirectory($subDirName[0]);
    }