IFileInfoAccess

by Daniel Marbach on December 29th, 2009
No notes
Syntax: C#
Show lines - Hide lines - Show in textbox - Download
    /// <summary>
    /// Interface which simplifies the access to the file info.
    /// </summary>
    public interface IFileInfoAccess : IFileSystemInfoAccess
    {
        /// <summary>
        /// Gets an instance of the parent directory.
        /// </summary>
        /// <value>A <see cref="IDirectoryInfoAccess"/> object representing the parent
        /// directory of this file.</value>
        /// <exception cref="DirectoryNotFoundException">The specified path is invalid, such as being on an unmapped drive.</exception>
        /// <exception cref="SecurityException">The caller does not have the required permission.</exception>
        IDirectoryInfoAccess Directory { get; }
 
        /// <summary>
        /// Gets a string representing the directory's full path.
        /// </summary>
        /// <value>A string representing the directory's full path.</value>
        /// <exception cref="SecurityException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentNullException">null was passed in for the directory name.</exception>
        string DirectoryName { get; }
 
        /// <summary>
        /// Gets or sets a value indicating whether the current file is read only.
        /// </summary>
        /// <value>
        /// true if the current file is read only; otherwise, false.
        /// </value>
        /// <exception cref="FileNotFoundException">The file described by the current 
        /// <see cref="IFileInfoAccess"/> object could not be found</exception>
        /// <exception cref="IOException">An I/O error occurred while opening the file.
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The file described by the current
        /// <see cref="IFileInfoAccess"/> object is read-only.  -or- This operation is not
        /// supported on the current platform.  -or- The caller does not have the required
        /// permission.</exception>
        bool IsReadOnly { get; set; }
 
        /// <summary>
        /// Gets the size, in bytes, of the current file.
        /// </summary>
        /// <value>The size of the current file in bytes.</value>
        /// <exception cref="IOException"><see cref="IFileSystemInfoAccess.Refresh()"/> cannot update the state of the file or directory.</exception>
        /// <exception cref="FileNotFoundException">The file does not exist. -or- The Length property is called for a directory.</exception>
        long Length { get; }
    }

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS