001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.commons.vfs2;
018
019/**
020 * An enumerated type representing the capabilities of files and file systems.
021 */
022public enum Capability {
023
024    /**
025     * File content can be read.
026     */
027    READ_CONTENT,
028
029    /**
030     * File content can be written.
031     */
032    WRITE_CONTENT,
033
034    /**
035     * File content can be read in random mode.
036     */
037    RANDOM_ACCESS_READ,
038
039    /**
040     * File content length can be set in random mode.
041     */
042    RANDOM_ACCESS_SET_LENGTH,
043
044    /**
045     * File content can be written in random mode.
046     */
047    RANDOM_ACCESS_WRITE,
048
049    /**
050     * File content can be appended.
051     */
052    APPEND_CONTENT,
053
054    /**
055     * File attributes are supported.
056     */
057    ATTRIBUTES,
058
059    /**
060     * File last-modified time is supported.
061     */
062    LAST_MODIFIED,
063
064    /**
065     * File get last-modified time is supported.
066     */
067    GET_LAST_MODIFIED,
068
069    /**
070     * File set last-modified time is supported.
071     */
072    SET_LAST_MODIFIED_FILE,
073
074    /**
075     * folder set last-modified time is supported.
076     */
077    SET_LAST_MODIFIED_FOLDER,
078
079    /**
080     * File content signing is supported.
081     */
082    SIGNING,
083
084    /**
085     * Files can be created.
086     */
087    CREATE,
088
089    /**
090     * Files can be deleted.
091     */
092    DELETE,
093
094    /**
095     * Files can be renamed.
096     */
097    RENAME,
098
099    /**
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}