forked from marceloverdijk/lesscss-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResource.java
More file actions
52 lines (45 loc) · 1.28 KB
/
Copy pathResource.java
File metadata and controls
52 lines (45 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package org.lesscss;
import java.io.IOException;
import java.io.InputStream;
/**
* LESS resource interface.
*
* <p>Abstracts {@link LessSource} from resource access technology. Makes it possible to load LESS resources from files,
* classpath resource, URL, etc.</p>
*
* @author Anton Pechinsky
*/
public interface Resource {
/**
* Tests if resource exists.
*
* @return true if resource exists.
*/
boolean exists();
/**
* Returns the time that the LESS source was last modified.
*
* @return A <code>long</code> value representing the time the resource was last modified, measured in milliseconds
* since the epoch (00:00:00 GMT, January 1, 1970).
*/
long lastModified();
/**
* Returns resource input stream.
*
* @throws IOException
*/
InputStream getInputStream() throws IOException;
/**
* Creates relative resource for current resource.
*
* @param relativeResourcePath String relative resource path
* @return Resource relative resource
*/
Resource createRelative(String relativeResourcePath) throws IOException;
/**
* Returns a unique name for this resource. (ie file name for files)
*
* @return the name of the resource
*/
String getName();
}