C# 클래스 Argentini.Halide.H3Storage

The H3Storage class contains methods and properties for performing or evaluating disk and file operations.
파일 보기 프로젝트 열기: argentini/Halide

공개 메소드들

메소드 설명
CreateDirectory ( string path ) : System.Boolean

Create a directory at a given web path.

DeleteDirectory ( string directory ) : String

Deletes a directory, and any files and subdirectories it contains. Directory passed is in standard web form (e.g. "/temp").

DeleteFiles ( string fileSpec ) : Int32

Deletes a single file immediately.

DeleteFiles ( string path, string fileSpec ) : Int32

Deletes file(s) immediately.

DeleteFiles ( string path, string filter, PathOptions options, System age ) : Int32

Deletes file(s) from a directory, based on age.

DeleteFiles ( string path, string fileSpec, bool includeSpecial ) : Int32

Deletes file(s) immediately.

DirectoryExists ( string path ) : System.Boolean

Determines if a directory exists at a given web path.

FileExists ( string path ) : System.Boolean

Determines if a file exists at a given web path.

GetFileExtension ( string fileName ) : String

Retrieve a file's extension, without the period.

GetFileSize ( string path ) : System.Int64

Get the file size in bytes of a file on disk.

GetFiles ( string path, string filter ) : ArrayList

Reads filenames from a directory and returns an ArrayList.

GetFiles ( string path, string filter, PathOptions options ) : ArrayList

Reads filenames from a directory and returns an ArrayList.

GetFolders ( string path ) : String[]

Reads directory names from a gievn path and returns a string array.

MakeUniqueFilename ( string ext ) : String

Creates a unique, cryptic filename (based on GUID) for use in temporary file manipulation.

MakeValidFileName ( string fileName ) : String

Replaces any invalid characters in a file name with underscores, returning the filtered filename.

MapPath ( string path ) : string

Transforms relative path to exact path for web and console apps.

ReadFile ( string filename ) : String

Reads the contents of a text file.

WriteFile ( string filename, string content ) : String

Writes a string to a text file.

비공개 메소드들

메소드 설명
H3Storage ( ) : System

메소드 상세

CreateDirectory() 공개 정적인 메소드

Create a directory at a given web path.
public static CreateDirectory ( string path ) : System.Boolean
path string Path and new directory (e.g. "/downloads/newdir").
리턴 System.Boolean

DeleteDirectory() 공개 정적인 메소드

Deletes a directory, and any files and subdirectories it contains. Directory passed is in standard web form (e.g. "/temp").
public static DeleteDirectory ( string directory ) : String
directory string Directory to delete (as "/temp"). Passing an empty string will delete the current working directory!
리턴 String

DeleteFiles() 공개 정적인 메소드

Deletes a single file immediately.
public static DeleteFiles ( string fileSpec ) : Int32
fileSpec string Web-formatted path with file name.
리턴 System.Int32

DeleteFiles() 공개 정적인 메소드

Deletes file(s) immediately.
public static DeleteFiles ( string path, string fileSpec ) : Int32
path string Web-formatted path where the files exist.
fileSpec string String filename wildcard (*.* is assumed by default). Separate multiple filespecs with a bar character (e.g. "*.gif|*.jpg").
리턴 System.Int32

DeleteFiles() 공개 정적인 메소드

Deletes file(s) from a directory, based on age.
public static DeleteFiles ( string path, string filter, PathOptions options, System age ) : Int32
path string Web-formatted path to the files or a full path and filename to delete a single file (the later ignores any age params).
filter string String filename wildcard (*.* is assumed by default). Separate multiple filespecs with a bar character (e.g. "*.gif|*.jpg").
options PathOptions options for file inclusion (PathOptions.Hidden | PathOptions.System) deletes all files, including hidden and system files.
age System DateTime object; files older than this (creation date; within 1 minute) are deleted.
리턴 System.Int32

DeleteFiles() 공개 정적인 메소드

Deletes file(s) immediately.
public static DeleteFiles ( string path, string fileSpec, bool includeSpecial ) : Int32
path string Web-formatted path where the files exist.
fileSpec string String filename wildcard (*.* is assumed by default). Separate multiple filespecs with a bar character (e.g. "*.gif|*.jpg").
includeSpecial bool Set to true to deleted hidden/system files.
리턴 System.Int32

DirectoryExists() 공개 정적인 메소드

Determines if a directory exists at a given web path.
public static DirectoryExists ( string path ) : System.Boolean
path string Path to a directory (e.g. "/downloads/").
리턴 System.Boolean

FileExists() 공개 정적인 메소드

Determines if a file exists at a given web path.
public static FileExists ( string path ) : System.Boolean
path string Path to a file (e.g. "/downloads/file.jpg").
리턴 System.Boolean

GetFileExtension() 공개 정적인 메소드

Retrieve a file's extension, without the period.
public static GetFileExtension ( string fileName ) : String
fileName string File name to parse.
리턴 String

GetFileSize() 공개 정적인 메소드

Get the file size in bytes of a file on disk.
public static GetFileSize ( string path ) : System.Int64
path string Path to a file (e.g. "/downloads/file.jpg").
리턴 System.Int64

GetFiles() 공개 정적인 메소드

Reads filenames from a directory and returns an ArrayList.
public static GetFiles ( string path, string filter ) : ArrayList
path string Web-formatted path to the files.
filter string String filename wildcard (*.* is assumed by default). /// Separate multiple filespecs with a bar character (e.g. "*.gif|*.jpg")
리턴 System.Collections.ArrayList

GetFiles() 공개 정적인 메소드

Reads filenames from a directory and returns an ArrayList.
public static GetFiles ( string path, string filter, PathOptions options ) : ArrayList
path string Web-formatted path to the files.
filter string String filename wildcard (*.* is assumed by default). /// Separate multiple filespecs with a bar character (e.g. "*.gif|*.jpg")
options PathOptions options for returned files inclusion, et al. /// (e.g. (PathOptions.Hidden | PathOptions.System | PathOptions.Path) returns all files, /// including hidden and system files, and the filename includes the full path).
리턴 System.Collections.ArrayList

GetFolders() 공개 정적인 메소드

Reads directory names from a gievn path and returns a string array.
public static GetFolders ( string path ) : String[]
path string Web-formatted parent path to examine.
리턴 String[]

MakeUniqueFilename() 공개 정적인 메소드

Creates a unique, cryptic filename (based on GUID) for use in temporary file manipulation.
public static MakeUniqueFilename ( string ext ) : String
ext string File extension to append to the name, without leading period.
리턴 String

MakeValidFileName() 공개 정적인 메소드

Replaces any invalid characters in a file name with underscores, returning the filtered filename.
public static MakeValidFileName ( string fileName ) : String
fileName string File name to filter.
리턴 String

MapPath() 공개 정적인 메소드

Transforms relative path to exact path for web and console apps.
public static MapPath ( string path ) : string
path string Web-style path to a file (e.g. "/downloads/file.jpg").
리턴 string

ReadFile() 공개 정적인 메소드

Reads the contents of a text file.
public static ReadFile ( string filename ) : String
filename string Web-formatted path and file name to read.
리턴 String

WriteFile() 공개 정적인 메소드

Writes a string to a text file.
public static WriteFile ( string filename, string content ) : String
filename string Web-formatted path and file name to save.
content string String to save into file.
리턴 String