Examples of FileSystem


Examples of org.terrier.utility.io.FileSystem

  /** Returns a RandomAccessFile implementation accessing the specificed file */
  public static RandomDataOutput writeFileRandom(String filename) throws IOException
  {
    filename = transform(filename);
    final FileSystem fs = getFileSystem(filename);
    if (fs == null)
      throw new FileNotFoundException("No file system for "+filename);
    if ((fs.capabilities() & FSCapability.RANDOM_WRITE) == 0)
      throw new IOException("File system not supporting random writes for "+ filename);
    return fs.writeFileRandom(filename);
  }
View Full Code Here

Examples of org.uberfire.java.nio.file.FileSystem

        org.uberfire.java.nio.file.Path repositoryRootPath = null;

        final Iterator<FileSystem> fsIterator = ioService.getFileSystems().iterator();

        if ( fsIterator.hasNext() ) {
            final FileSystem fileSystem = fsIterator.next();
            logger.info( "-----FileSystem id--- :" + ( (org.uberfire.java.nio.base.FileSystemId) fileSystem ).id() );

            if ( repositoryName.equalsIgnoreCase( ( (org.uberfire.java.nio.base.FileSystemId) fileSystem ).id() ) ) {
                final Iterator<org.uberfire.java.nio.file.Path> rootIterator = fileSystem.getRootDirectories().iterator();
                if ( rootIterator.hasNext() ) {
                    repositoryRootPath = rootIterator.next();
                    logger.info( "-----rootPath--- :" + repositoryRootPath );

                    org.uberfire.java.nio.file.DirectoryStream<org.uberfire.java.nio.file.Path> paths = ioService
View Full Code Here

Examples of org.vertx.java.core.file.FileSystem

     * @param request
     * @param dir
     * @param next
     */
    private void sendDirectory(final YokeRequest request, final String dir, final Handler<Object> next) {
        final FileSystem fileSystem = vertx().fileSystem();

        fileSystem.readDir(dir, new AsyncResultHandler<String[]>() {
            @Override
            public void handle(AsyncResult<String[]> asyncResult) {
                if (asyncResult.failed()) {
                    next.handle(asyncResult.cause());
                } else {
View Full Code Here

Examples of scratch.filesystem.FileSystem

  public void initComponent() {
    ScratchLog log = new ScratchLog();
    ScratchConfigPersistence configPersistence = ScratchConfigPersistence.getInstance();
    ScratchConfig config = configPersistence.asConfig();

    fileSystem = new FileSystem(configPersistence.getScratchesFolderPath());
    Ide ide = new Ide(fileSystem, log);
    mrScratchManager = new MrScratchManager(ide, fileSystem, config, log);

    if (config.needMigration) {
            getApplication().invokeLater(new Runnable() {
View Full Code Here

Examples of sun.management.FileSystem

        }
        if (!file.canRead()) {
            throw new AgentConfigurationError(SNMP_ACL_FILE_NOT_READABLE, aclFileName);
        }

        FileSystem fs = FileSystem.open();
        try {
            if (fs.supportsFileSecurity(file)) {
                if (!fs.isAccessUserOnly(file)) {
                    throw new AgentConfigurationError(SNMP_ACL_FILE_ACCESS_NOT_RESTRICTED,
                        aclFileName);
                }
            }
        } catch (IOException e) {
View Full Code Here

Examples of util.FileSystem

    try {
      imgBy = thumbnail.getBytes();
    } catch (IOException e1) {
      e1.printStackTrace();
    }
    FileSystem fSystem = new FileSystem();
    fSystem.setBasePath("static");
    String name = System.currentTimeMillis() + ".jpg";
    fSystem.write(imgBy, name);
    response.setContentType("text/plain");
    response.setCharacterEncoding("utf-8");
    PrintWriter out = null;
    try {
      out = response.getWriter();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.