Click or drag to resize
Galactic API

File Class

A utility class for manipulating files on the file system.
Inheritance Hierarchy
SystemObject
  Galactic.FileSystemFile

Namespace:  Galactic.FileSystem
Assembly:  Galactic.FileSystem (in Galactic.FileSystem.dll) Version: 1.3.0.499 (1.3.0.499)
Syntax
public class File : IDisposable

The File type exposes the following members.

Constructors
  NameDescription
Public methodFile
Creates or opens a file at the supplied path location.
Top
Properties
  NameDescription
Public propertyPath
The path to the file on the file system.
Public propertyReadOnly
Whether the file is opened as read-only.
Public propertySecurity
The FileSecurity object for this file.
Top
Methods
  NameDescription
Public methodClose
Closes this file.
Public methodStatic memberCopy
Copies a file to a new location.
Public methodStatic memberCreate
Creates or overwrites a file at the supplied path location.
Public methodDelete
Deletes this file.
Public methodStatic memberDelete(String)
Deletes the file at the specified path.
Public methodDispose
Frees the resources used by this file.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExists
Checks whether this file exists on the file system.
Public methodStatic memberExists(String)
Checks whether the file at the specified path exists on the file system.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodStatic memberGetReader
Opens and gets a StreamReader for the file at the supplied path.
Public methodStatic memberGetSecurityObject
Gets the FileSecurity object for the file specified by the supplied path.
Public methodStatic memberGetSizeInBytes
Gets the size of a file in bytes.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMove(String)
Moves this file to a new location.
Public methodStatic memberMove(String, String)
Moves a file to a new location.
Public methodStatic memberOpen
Opens a file at the supplied path location.
Public methodReadAllAsText
Reads the entire contents of this text file, and returns it as a string.
Public methodStatic memberReadAllAsText(FileStream)
Reads the entire contents of a text file, and returns it as a string.
Public methodStatic memberReadAllAsText(String)
Reads the entire contents of a text file, and returns it as a string.
Public methodReadLine
Reads a line of text from this file.
Public methodStatic memberReadLine(FileStream, StreamReader)
Reads a line of text from a file's stream.
Public methodRemoveAllExplicitAccessRules(Boolean)
Removes all explicit access rules from this file.
Public methodStatic memberRemoveAllExplicitAccessRules(String, FileSecurity, Boolean)
Removes all explicit access rules from the supplied file.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWriteLine(String)
Writes a line of text to the file.
Public methodStatic memberWriteLine(FileStream, String)
Writes a line of text to the specified file stream.
Top
See Also