1 /* 2 * Copyright (C) 2003-2009 JNode.org 3 * 2009,2010 Matthias Treydte <mt@waldheinz.de> 4 * 5 * This library is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU Lesser General Public License as published 7 * by the Free Software Foundation; either version 2.1 of the License, or 8 * (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, but 11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 13 * License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with this library; If not, write to the Free Software Foundation, Inc., 17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 */ 19 20 package de.waldheinz.fs; 21 22 /** 23 * This interface is the base interface for objects that are part of a 24 * {@link FileSystem}. 25 * 26 * @author Ewout Prangsma <epr at jnode.org> 27 * @author Matthias Treydte <waldheinz at gmail.com> 28 */ 29 public interface FsObject { 30 31 /** 32 * Checks if this {@code FsObject} is still valid. 33 * 34 * An object is not valid anymore if it has been removed from the 35 * filesystem. All invocations on methods (except this method and the 36 * methods inherited from {@link java.lang.Object}) of 37 * invalid objects must throw an {@link IllegalStateException}. 38 * 39 * @return if this {@code FsObject} is still valid 40 */ isValid()41 public boolean isValid(); 42 43 /** 44 * Checks if this {@code FsObject} is read-only. Any attempt to modify a 45 * read-only {@code FsObject} must result in a {@link ReadOnlyException} 46 * being thrown, and the modification must not be performed. 47 * 48 * @return if this {@code FsObject} is read-only 49 * @since 0.6 50 */ isReadOnly()51 public boolean isReadOnly(); 52 53 } 54