Package java.nio.file

Examples of java.nio.file.Path.startsWith()


    Path path = folder.getProjectRelativePath().toFile().toPath();
   
    if(isProjecInsideGoPath) {
      return isValidSourcePackageName(path);
    } else {
      if(path.startsWith("src")) {
        path = MiscUtil.createValidPath("src").relativize(path);
        return isValidSourcePackageName(path);
      }
      return false;
    }
View Full Code Here


        if (hasAttribute(ATTR_APP_CLASS_PATH)) {
            for (String sp : getListAttribute(ATTR_APP_CLASS_PATH)) {
                Path p = path(expand(sanitize(sp)));

                if (appCache == null && (!p.isAbsolute() || p.startsWith(appCache)))
                    throw new IllegalStateException("Cannot resolve " + sp + "  in " + ATTR_APP_CLASS_PATH + " attribute when the "
                            + ATTR_EXTRACT + " attribute is set to false");

                p = appCache.resolve(p);
                classPath.add(p);
View Full Code Here

        if (hasAttribute(ATTR_APP_CLASS_PATH)) {
            for (String sp : getListAttribute(ATTR_APP_CLASS_PATH)) {
                Path p = path(expand(sanitize(sp)));

                if (appCache == null && (!p.isAbsolute() || p.startsWith(appCache)))
                    throw new IllegalStateException("Cannot resolve " + sp + "  in " + ATTR_APP_CLASS_PATH + " attribute when the "
                            + ATTR_EXTRACT + " attribute is set to false");

                p = appCache.resolve(p);
                classPath.add(p);
View Full Code Here

        name.pachler.nio.file.Path extLibFilePath = (name.pachler.nio.file.Path) watchEvent.context();
        Path filePath = Paths.get(extLibFilePath.toString()).toAbsolutePath().normalize();
       
        for (Path ignorePath : ignorePaths) {
          if (filePath.startsWith(ignorePath.toAbsolutePath().normalize())) {
            ignoreEvent = true;
            break;
          }
        }
       
View Full Code Here

      @Override
      public void handle(HttpServerRequest request) {
        Path path = Paths.get(request.uri);

        if (path.startsWith("/api")) {
          apiHandler.handle(request);
          return;
        }

        fileHandler.handle(request);
View Full Code Here

        if (hasAttribute(ATTR_APP_CLASS_PATH)) {
            for (String sp : getListAttribute(ATTR_APP_CLASS_PATH)) {
                Path p = Paths.get(expand(sanitize(sp)));

                if (appCache == null && (!p.isAbsolute() || p.startsWith(appCache)))
                    throw new IllegalStateException("Cannot resolve " + sp + "  in " + ATTR_APP_CLASS_PATH + " attribute when the "
                            + ATTR_EXTRACT + " attribute is set to false");

                p = appCache.resolve(p);
                classPath.add(p);
View Full Code Here

                // read filename line
                line = in.readLine();
                fileName = getValue("filename", line); //NON-NLS
                Path p = Paths.get(fileName);
                if (p.startsWith(basePath)) {
                    fileName = p.getFileName().toString();
                }

                line = in.readLine(); /// read filesize line
                fileSize = Long.parseLong(getValue("filesize", line)); //NON-NLS
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.