src/Tools/Setup/isabelle/setup/Build.java
changeset 73957 110a027a5473
parent 73955 2b9ae1aa9257
child 73960 027f837d18ee
equal deleted inserted replaced
73956:ac1884965dc8 73957:110a027a5473
    96         public List<String> requirements() { return get_list("requirements"); }
    96         public List<String> requirements() { return get_list("requirements"); }
    97         public List<String> sources() { return get_list("sources"); }
    97         public List<String> sources() { return get_list("sources"); }
    98         public List<String> resources() { return get_list("resources"); }
    98         public List<String> resources() { return get_list("resources"); }
    99         public List<String> services() { return get_list("services"); }
    99         public List<String> services() { return get_list("services"); }
   100 
   100 
   101         public Path path(String file) { return _dir.resolve(file); }
   101         public Path path(String file)
   102         public boolean exists(String file) { return Files.exists(path(file)); }
   102             throws IOException, InterruptedException
       
   103         {
       
   104             return _dir.resolve(Environment.expand_platform_path(file));
       
   105         }
       
   106         public boolean exists(String file)
       
   107             throws IOException, InterruptedException
       
   108         {
       
   109             return Files.exists(path(file));
       
   110         }
   103 
   111 
   104         // historic
   112         // historic
   105         public Path shasum_path() { return path(lib_name() + ".shasum"); }
   113         public Path shasum_path()
       
   114             throws IOException, InterruptedException
       
   115         {
       
   116             return path(lib_name() + ".shasum");
       
   117         }
   106 
   118 
   107         public String item_name(String s)
   119         public String item_name(String s)
   108         {
   120         {
   109             int i = s.indexOf(':');
   121             int i = s.indexOf(':');
   110             return i > 0 ? s.substring(0, i) : s;
   122             return i > 0 ? s.substring(0, i) : s;
   133             }
   145             }
   134             else { return ""; }
   146             else { return ""; }
   135         }
   147         }
   136 
   148 
   137         public String shasum(String file)
   149         public String shasum(String file)
   138             throws IOException, NoSuchAlgorithmException
   150             throws IOException, NoSuchAlgorithmException, InterruptedException
   139         {
   151         {
   140             return shasum(file, List.of(path(file)));
   152             return shasum(file, List.of(path(file)));
   141         }
   153         }
   142     }
   154     }
   143 
   155