View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.apache.commons.vfs2;
18  
19  /**
20   * An enumerated type representing the capabilities of files and file systems.
21   */
22  public enum Capability {
23  
24      /**
25       * File content can be read.
26       */
27      READ_CONTENT,
28  
29      /**
30       * File content can be written.
31       */
32      WRITE_CONTENT,
33  
34      /**
35       * File content can be read in random mode.
36       */
37      RANDOM_ACCESS_READ,
38  
39      /**
40       * File content length can be set in random mode.
41       */
42      RANDOM_ACCESS_SET_LENGTH,
43  
44      /**
45       * File content can be written in random mode.
46       */
47      RANDOM_ACCESS_WRITE,
48  
49      /**
50       * File content can be appended.
51       */
52      APPEND_CONTENT,
53  
54      /**
55       * File attributes are supported.
56       */
57      ATTRIBUTES,
58  
59      /**
60       * File last-modified time is supported.
61       */
62      LAST_MODIFIED,
63  
64      /**
65       * File get last-modified time is supported.
66       */
67      GET_LAST_MODIFIED,
68  
69      /**
70       * File set last-modified time is supported.
71       */
72      SET_LAST_MODIFIED_FILE,
73  
74      /**
75       * folder set last-modified time is supported.
76       */
77      SET_LAST_MODIFIED_FOLDER,
78  
79      /**
80       * File content signing is supported.
81       */
82      SIGNING,
83  
84      /**
85       * Files can be created.
86       */
87      CREATE,
88  
89      /**
90       * Files can be deleted.
91       */
92      DELETE,
93  
94      /**
95       * Files can be renamed.
96       */
97      RENAME,
98  
99      /**
100      * The file type can be determined.
101      */
102     GET_TYPE,
103 
104     /**
105      * Children of files can be listed.
106      */
107     LIST_CHILDREN,
108 
109     /**
110      * URI are supported. Files without this capability use URI that do not globally and uniquely identify the file.
111      */
112     URI,
113 
114     /**
115      * File system attributes are supported.
116      */
117     FS_ATTRIBUTES,
118 
119     /**
120      * Junctions are supported.
121      */
122     JUNCTIONS,
123 
124     /**
125      * The set of attributes defined by the Jar manifest specification are supported. The attributes aren't necessarily
126      * stored in a manifest file.
127      */
128     MANIFEST_ATTRIBUTES,
129 
130     /**
131      * The provider itself do not provide a file system. It simply resolves a full name and dispatches the request back
132      * to the file system manager.
133      * <p>
134      * A provider with this capability cant tell much about the capabilities about the finally used file system in
135      * advance.
136      * </p>
137      */
138     DISPATCHER,
139 
140     /**
141      * A compressed file system is a file system which use compression.
142      */
143     COMPRESS,
144 
145     /**
146      * A virtual file system can be an archive like tar or zip.
147      */
148     VIRTUAL,
149 
150     /**
151      * Provides directories which allows you to read its content through
152      * {@link org.apache.commons.vfs2.FileContent#getInputStream()}.
153      *
154      * @since 2.0
155      */
156     DIRECTORY_READ_CONTENT;
157 }