Home | History | Annotate | Download | only in io
      1 /*
      2  * Copyright (C) 2008 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package com.android.io;
     18 
     19 /**
     20  * Base representation of a file system resource.<p/>
     21  * This somewhat limited interface is designed to let classes use file-system resources, without
     22  * having the manually handle either the standard Java file or the Eclipse file API..
     23  */
     24 public interface IAbstractResource {
     25 
     26     /**
     27      * Returns the name of the resource.
     28      */
     29     String getName();
     30 
     31     /**
     32      * Returns the OS path of the folder location.
     33      */
     34     String getOsLocation();
     35 
     36     /**
     37      * Returns whether the resource actually exists.
     38      */
     39     boolean exists();
     40 
     41     /**
     42      * Returns the parent folder or null if there is no parent.
     43      */
     44     IAbstractFolder getParentFolder();
     45 
     46     /**
     47      * Deletes the resource.
     48      */
     49     boolean delete();
     50 }
     51