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
111      * globally and uniquely identify the file.
112      */
113     URI,
114 
115     /**
116      * File system attributes are supported.
117      */
118     FS_ATTRIBUTES,
119 
120     /**
121      * Junctions are supported.
122      */
123     JUNCTIONS,
124 
125     /**
126      * The set of attributes defined by the Jar manifest specification are
127      * supported.  The attributes aren't necessarily stored in a manifest file.
128      */
129     MANIFEST_ATTRIBUTES,
130 
131     /**
132      * The provider itself do not provide a filesystem. It simply resolves a full name
133      * and dispatches the request back to the filesystemmanager.<br>
134      * A provider with this capability cant tell much about the capabilities about the
135      * finally used filesystem in advance.
136      */
137     DISPATCHER,
138 
139     /**
140      * A compressed filesystem is a filesystem which use compression.
141      */
142     COMPRESS,
143 
144     /**
145      * A virtual filesystem can be an archive like tar or zip.
146      */
147     VIRTUAL,
148 
149     /**
150      * Provides directories which allows you to read its content through
151      * {@link org.apache.commons.vfs2.FileContent#getInputStream()}.
152      * @since 2.0
153      */
154     DIRECTORY_READ_CONTENT;
155 }