Examples of LocalFileSystem


Examples of com.intellij.openapi.vfs.LocalFileSystem

    }

    public void setupRootModel(ModifiableRootModel rootModel) throws ConfigurationException {
        String moduleRootPath = getContentEntryPath();
        if (moduleRootPath != null) {
            LocalFileSystem localFileSystem = LocalFileSystem.getInstance();
            VirtualFile moduleContentRoot = localFileSystem.refreshAndFindFileByPath(FileUtil.toSystemIndependentName(moduleRootPath));
            if (moduleContentRoot != null) {
                ContentEntry contentEntry = rootModel.addContentEntry(moduleContentRoot);
                List<Pair<String, String>> sourcePaths = getSourcePaths();
                if (sourcePaths != null) {
                    for (Pair<String, String> sourcePath : sourcePaths) {
                        VirtualFile sourceRoot = localFileSystem.refreshAndFindFileByPath(FileUtil.toSystemIndependentName(sourcePath.first));
                        if (sourceRoot != null) {
                            contentEntry.addSourceFolder(sourceRoot, false, sourcePath.second);
                        }
                    }
                }
View Full Code Here

Examples of com.mozilla.grouperfish.services.local.LocalFileSystem

    }

    @Override
    protected void configure() {

        final FileSystem localFs = new LocalFileSystem("./data/local/");

        bind(FileSystem.class).annotatedWith(Local.class).toInstance(localFs);
        bind(FileSystem.class).toInstance(localFs);
        if (hasHadoop(properties)) {
            log.info("Hadoop available. Using HDFS for shared file system.");
View Full Code Here

Examples of eu.stratosphere.core.fs.local.LocalFileSystem

      for (int i = 0; i < 100; i++) {
        pw.append("line\n");
      }
      pw.close();

      LocalFileSystem lfs = new LocalFileSystem();
      FSDataInputStream fis = lfs.open(pathtotestfile);

      // first, we test under "usual" conditions
      final LineReader lr = new LineReader(fis, 0, testfile.length(), 256);

      byte[] buffer;
View Full Code Here

Examples of net.sourceforge.fullsync.fs.filesystems.LocalFileSystem

  private Hashtable<String, FileSystem> schemes;
  private Hashtable<String, SyncFilesBufferingProvider> buffering;

  public FileSystemManager() {
    schemes = new Hashtable<String, FileSystem>();
    schemes.put("file", new LocalFileSystem());
    schemes.put("ftp", new FTPFileSystem());
    schemes.put("sftp", new SFTPFileSystem());
    schemes.put("smb", new SmbFileSystem());

    buffering = new Hashtable<String, SyncFilesBufferingProvider>();
View Full Code Here

Examples of org.apache.commons.vfs.provider.local.LocalFileSystem

            }
            final FileName rootName =
                getContext().parseURI(scheme + ":" + FileName.ROOT_PATH);
            // final FileName rootName =
            //    new LocalFileName(scheme, scheme + ":", FileName.ROOT_PATH);
            filesystem = new LocalFileSystem(rootName, rootFile.getAbsolutePath(), properties);
            addFileSystem(this, filesystem);
        }

        // Find the file
        return filesystem.resolveFile(path);
View Full Code Here

Examples of org.apache.commons.vfs2.provider.local.LocalFileSystem

            }
            final FileName rootName =
                getContext().parseURI(scheme + ":" + FileName.ROOT_PATH);
            // final FileName rootName =
            //    new LocalFileName(scheme, scheme + ":", FileName.ROOT_PATH);
            filesystem = new LocalFileSystem(rootName, rootFile.getAbsolutePath(), properties);
            addFileSystem(this, filesystem);
        }

        // Find the file
        return filesystem.resolveFile(path);
View Full Code Here

Examples of org.apache.flink.core.fs.local.LocalFileSystem

      for (int i = 0; i < 100; i++) {
        pw.append("line\n");
      }
      pw.close();

      LocalFileSystem lfs = new LocalFileSystem();
      FSDataInputStream fis = lfs.open(pathtotestfile);

      // first, we test under "usual" conditions
      final LineReader lr = new LineReader(fis, 0, testfile.length(), 256);

      byte[] buffer;
View Full Code Here

Examples of org.apache.hadoop.fs.LocalFileSystem

  public static void main(String [] argv) throws IOException {
    Configuration conf = new Configuration();
    conf.setInt("io.file.buffer.size", 64*1024);
    RawLocalFileSystem rlfs = new RawLocalFileSystem();
    rlfs.setConf(conf);
    LocalFileSystem lfs = new LocalFileSystem(rlfs);
   
    Path path = new Path("/Users/ryan/rfile.big.txt");
    long start = System.currentTimeMillis();
    SimpleBlockCache cache = new SimpleBlockCache();
    //LruBlockCache cache = new LruBlockCache();
View Full Code Here

Examples of org.apache.hadoop.fs.LocalFileSystem

    List<SoftReference<FaultyOutputStream>> outStreams =
      new ArrayList<SoftReference<FaultyOutputStream>>();
    private long faultPos = 200;

    public FaultyFileSystem() {
      super(new LocalFileSystem());
      System.err.println("Creating faulty!");
    }
View Full Code Here

Examples of org.apache.hadoop.fs.LocalFileSystem

  /**
   * Gets the current umask.
   */
  private String getCurrentUmask(String tmpDir, Configuration config) throws IOException {
    try {
      LocalFileSystem localFS = FileSystem.getLocal(config);
      return Integer.toOctalString(localFS.getFileStatus(new Path(getTmpDir())).getPermission().toShort());
    } catch (Exception e) {
      return null;
    }
  }
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.