IFileInfo Interfejs
Definicja
Reprezentuje plik w danym dostawcy plików.Represents a file in the given file provider.
public interface class IFileInfo
public interface IFileInfo
type IFileInfo = interface
Public Interface IFileInfo
- Pochodne
Właściwości
Exists |
Ma wartość true, jeśli zasób istnieje w źródłowym systemie magazynu.True if resource exists in the underlying storage system. |
IsDirectory |
Wartość true w przypadku TryGetDirectoryContents przypadku wylicza podkatalog.True for the case TryGetDirectoryContents has enumerated a sub-directory. |
LastModified |
Pobiera datę ostatniej modyfikacji pliku.Gets when the file was last modified. |
Length |
Długość pliku w bajtach lub-1 dla katalogu lub nieistniejących plików.The length of the file in bytes, or -1 for a directory or non-existing files. |
Name |
Nazwa pliku lub katalogu, bez uwzględnienia ścieżki.The name of the file or directory, not including any path. |
PhysicalPath |
Ścieżka do pliku, łącznie z nazwą pliku.The path to the file, including the file name. Zwróć wartość null, jeśli plik nie jest bezpośrednio dostępny.Return null if the file is not directly accessible. |
Metody
CreateReadStream() |
Zwróć zawartość pliku jako strumień tylko do odczytu.Return file contents as readonly stream. Obiekt wywołujący powinien usunąć strumień po zakończeniu.Caller should dispose stream when complete. |