Package com.cloudvane.ossc.infrastructure

Examples of com.cloudvane.ossc.infrastructure.CloudObject


   
    c.getClient().createDirectory(ncd);
   
    listDirectories(c, "List directories");
   
    CloudObject obj = new CloudObject();
    obj.setFileName(UUID.randomUUID().toString() + ".txt");
    obj.setCloudObject(new FileInputStream("ossc.config"));
    obj.setDirectoryName(c.getClient().getFullPath(ncd));
   
    c.getClient().createObject(ncd, obj);
   
    listDirectories(c, "Now with a file");
   
View Full Code Here


  public List<CloudObject> listObjectsInDirectory(CloudDirectory directory) {
    List<CloudObject> retval = new LinkedList<CloudObject>();
    File maindirectory = new File(getDirectory() + File.separator + directory.getDirectoryName());
   
    for(File f : maindirectory.listFiles()) {
      CloudObject co = new CloudObject();
      co.setAccessControl(AccessControlEnum.Public);
      co.setFileName(f.getName());
      co.setDirectoryName(maindirectory.getAbsolutePath() + File.separator);
      retval.add(co);
    }
   
    return retval;
  }
View Full Code Here

TOP

Related Classes of com.cloudvane.ossc.infrastructure.CloudObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.