crashanalysercmd/PerfToolsSharedLibraries/Engine/SymbianUtils/FileSystem/FSEntityFile.cs
changeset 0 818e61de6cd1
equal deleted inserted replaced
-1:000000000000 0:818e61de6cd1
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 * 
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 using System;
       
    18 using System.Collections.Generic;
       
    19 using System.Text;
       
    20 using System.IO;
       
    21 
       
    22 namespace SymbianUtils.FileSystem
       
    23 {
       
    24     public class FSEntityFile : FSEntity
       
    25     {
       
    26         #region Constructors
       
    27         public FSEntityFile( FileInfo aFile )
       
    28         {
       
    29             iFile = aFile;
       
    30         }
       
    31         #endregion
       
    32 
       
    33         #region API
       
    34         #endregion
       
    35 
       
    36         #region Properties
       
    37         public override string FullName
       
    38         {
       
    39             get
       
    40             { 
       
    41                 StringBuilder ret = new StringBuilder();
       
    42                 //
       
    43                 if ( IsValid )
       
    44                 {
       
    45                     ret.Append( File.FullName );
       
    46                 }
       
    47                 //
       
    48                 return ret.ToString(); 
       
    49             }
       
    50         }
       
    51 
       
    52         public override bool Exists
       
    53         {
       
    54             get
       
    55             {
       
    56                 bool ret = false;
       
    57                 //
       
    58                 if ( IsValid )
       
    59                 {
       
    60                     ret = iFile.Exists;
       
    61                 }
       
    62                 //
       
    63                 return ret;
       
    64             }
       
    65         }
       
    66 
       
    67         public override bool IsValid
       
    68         {
       
    69             get { return iFile != null; }
       
    70         }
       
    71 
       
    72         public FileInfo File
       
    73         {
       
    74             get { return iFile; }
       
    75         }
       
    76         #endregion
       
    77 
       
    78         #region Operators
       
    79         public static implicit operator FileInfo( FSEntityFile aEntity )
       
    80         {
       
    81             return aEntity.File;
       
    82         }
       
    83         #endregion
       
    84 
       
    85         #region Internal properties
       
    86         #endregion
       
    87 
       
    88         #region Internal methods
       
    89         #endregion
       
    90 
       
    91         #region Data members
       
    92         private FileInfo iFile;
       
    93         #endregion
       
    94     }
       
    95 }