| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- //------------------------------------------------------------------------------
- //
- // System.IO.FileSystemInfo.cs
- //
- // Copyright (C) 2001 Moonlight Enterprises, All Rights Reserved
- //
- // Author: Jim Richardson, [email protected]
- // Created: Monday, August 13, 2001
- //
- //------------------------------------------------------------------------------
- using System;
- namespace System.IO
- {
- /// <summary>
- ///
- /// </summary>
- public abstract class FileSystemInfo : MarshalByRefObject
- {
- private FileAttributes itsAttributes;
- private DateTime itsCreated;
- private DateTime itsLastAccess;
- private DateTime itsLastWrite;
- //private string itsFullName;
- protected string FullPath;
- protected string OriginalPath;
- public FileSystemInfo()
- {
- //
- // TODO: Add constructor logic here
- //
- }
- public FileAttributes Attributes
- {
- get
- {
- return itsAttributes;
- }
- set
- {
- itsAttributes = value;
- }
- }
- public DateTime CreationTime
- {
- get
- {
- return itsCreated;
- }
- set
- {
- itsCreated = value;
- }
- }
- public abstract bool Exists {get;}
- public abstract string Name {get;}
- public abstract void Delete();
- /// <summary>
- /// Get the extension of this item
- /// </summary>
- public string Extension
- {
- get
- {
- return Path.GetExtension(FullPath);
- }
- }
- public string FullName
- {
- get
- {
- return FullPath;
- }
- }
- public DateTime LastAccessTime
- {
- get
- {
- return itsLastAccess;
- }
- }
- public DateTime LastWriteTime
- {
- get
- {
- return itsLastWrite;
- }
- }
- public override int GetHashCode()
- {
- return FullPath.GetHashCode();
- }
- public override bool Equals(object obj)
- {
- return false;
- }
- new public static bool Equals(object obj1, object obj2)
- {
- return false;
- }
- public void Refresh()
- {
- }
- /* TODO: determine if we need these
- public override ObjRef CreateObjRef(Type requestedType)
- {
- return null;
- }
-
- /*public object GetLifeTimeService ()
- {
- return null;
- }
- public override object InitializeLifeTimeService ()
- {
- return null;
- }
- */
- }
- }
|