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 * File content can be read. 025 */ 026 READ_CONTENT, 027 028 /** 029 * File content can be written. 030 */ 031 WRITE_CONTENT, 032 033 /** 034 * File content can be read in random mode. 035 */ 036 RANDOM_ACCESS_READ, 037 038 /** 039 * File content length can be set in random mode. 040 */ 041 RANDOM_ACCESS_SET_LENGTH, 042 043 /** 044 * File content can be written in random mode. 045 */ 046 RANDOM_ACCESS_WRITE, 047 048 /** 049 * File content can be appended. 050 */ 051 APPEND_CONTENT, 052 053 /** 054 * File attributes are supported. 055 */ 056 ATTRIBUTES, 057 058 /** 059 * File last-modified time is supported. 060 */ 061 LAST_MODIFIED, 062 063 /** 064 * File get last-modified time is supported. 065 */ 066 GET_LAST_MODIFIED, 067 068 /** 069 * File set last-modified time is supported. 070 */ 071 SET_LAST_MODIFIED_FILE, 072 073 /** 074 * folder set last-modified time is supported. 075 */ 076 SET_LAST_MODIFIED_FOLDER, 077 078 /** 079 * File content signing is supported. 080 */ 081 SIGNING, 082 083 /** 084 * Files can be created. 085 */ 086 CREATE, 087 088 /** 089 * Files can be deleted. 090 */ 091 DELETE, 092 093 /** 094 * Files can be renamed. 095 */ 096 RENAME, 097 098 /** 099 * The file type can be determined. 100 */ 101 GET_TYPE, 102 103 /** 104 * Children of files can be listed. 105 */ 106 LIST_CHILDREN, 107 108 /** 109 * URI are supported. Files without this capability use URI that do not globally and uniquely identify the file. 110 */ 111 URI, 112 113 /** 114 * File system attributes are supported. 115 */ 116 FS_ATTRIBUTES, 117 118 /** 119 * Junctions are supported. 120 */ 121 JUNCTIONS, 122 123 /** 124 * The set of attributes defined by the Jar manifest specification are supported. The attributes aren't necessarily 125 * stored in a manifest file. 126 */ 127 MANIFEST_ATTRIBUTES, 128 129 /** 130 * The provider itself do not provide a filesystem. It simply resolves a full name and dispatches the request back 131 * to the filesystemmanager.<br> 132 * A provider with this capability cant tell much about the capabilities about the finally used filesystem in 133 * advance. 134 */ 135 DISPATCHER, 136 137 /** 138 * A compressed filesystem is a filesystem which use compression. 139 */ 140 COMPRESS, 141 142 /** 143 * A virtual filesystem can be an archive like tar or zip. 144 */ 145 VIRTUAL, 146 147 /** 148 * Provides directories which allows you to read its content through 149 * {@link org.apache.commons.vfs2.FileContent#getInputStream()}. 150 * 151 * @since 2.0 152 */ 153 DIRECTORY_READ_CONTENT; 154}