Package net.sf.robocode.host.io

Examples of net.sf.robocode.host.io.RobotFileSystemManager


    // FilePermission access request.
    if (perm instanceof FilePermission) {
      FilePermission filePermission = (FilePermission) perm;
      // Get the fileSystemManager
      RobotFileSystemManager fileSystemManager = robotProxy.getRobotFileSystemManager();

      // Robot wants access to read something
      if (filePermission.getActions().equals("read")) {
        return impliesRobotFileRead(robotProxy, fileSystemManager, filePermission);
View Full Code Here


          return null;
        }
      });
    }

    final RobotFileSystemManager fileSystemManager = robotProxy.getRobotFileSystemManager();

    File f = new File(fileName);
    long len;

    if (f.exists()) {
      len = f.length();
    } else {
      fileSystemManager.checkQuota();
      len = 0;
    }

    if (!append) {
      fileSystemManager.adjustQuota(-len);
    }

    outputStreamThreads.add(c);
    return new RobotFileOutputStream(fileName, append, fileSystemManager);
  }
View Full Code Here

    out = new RobotOutputStream();
    robotThreadManager = new RobotThreadManager(this);

    loadClassBattle();

    robotFileSystemManager = new RobotFileSystemManager(this, hostManager.getRobotFilesystemQuota(),
        robotSpecification.getWritableDirectory(), robotSpecification.getReadableDirectory(),
        robotSpecification.getRootPath());

    robotFileSystemManager.initialize();
  }
View Full Code Here

TOP

Related Classes of net.sf.robocode.host.io.RobotFileSystemManager

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.