Path: blob/master/src/java.base/share/classes/java/nio/file/attribute/DosFileAttributes.java
41161 views
/*1* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package java.nio.file.attribute;2627/**28* File attributes associated with a file in a file system that supports29* legacy "DOS" attributes.30*31* <p> <b>Usage Example:</b>32* <pre>33* Path file = ...34* DosFileAttributes attrs = Files.readAttributes(file, DosFileAttributes.class);35* </pre>36*37* @since 1.738*/3940public interface DosFileAttributes41extends BasicFileAttributes42{43/**44* Returns the value of the read-only attribute.45*46* <p> This attribute is often used as a simple access control mechanism47* to prevent files from being deleted or updated. Whether the file system48* or platform does any enforcement to prevent <em>read-only</em> files49* from being updated is implementation specific.50*51* @return the value of the read-only attribute52*/53boolean isReadOnly();5455/**56* Returns the value of the hidden attribute.57*58* <p> This attribute is often used to indicate if the file is visible to59* users.60*61* @return the value of the hidden attribute62*/63boolean isHidden();6465/**66* Returns the value of the archive attribute.67*68* <p> This attribute is typically used by backup programs.69*70* @return the value of the archive attribute71*/72boolean isArchive();7374/**75* Returns the value of the system attribute.76*77* <p> This attribute is often used to indicate that the file is a component78* of the operating system.79*80* @return the value of the system attribute81*/82boolean isSystem();83}848586