Package v7db.files.mongodb

Examples of v7db.files.mongodb.V7GridFS


    }

    DB db = Configuration.getMongo().getDB(
        Configuration.getProperty("mongo.db"));

    V7GridFS fs = new V7GridFS(db);

    String[] path = CopyCommand.getPath(args[1], args[2]);

    V7File existing = fs.getFile(path);

    if (existing != null) {
      if (existing.hasContent()) {
        throw new IOException(args[2]
            + " already exists (and is a file)");
      }
      throw new IOException("directory " + args[2] + " already exists");
    }

    V7File parent = CopyCommand.getParent(fs, path);
    fs.addFolder(parent.getId(), path[path.length - 1]);

  }
View Full Code Here

TOP

Related Classes of v7db.files.mongodb.V7GridFS

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.