PhysicalFileProvider Sınıf

Tanım

Disk üzerinde dosya sistemini kullanarak dosyaları arar.Looks up files using the on-disk file system.

public ref class PhysicalFileProvider : IDisposable, Microsoft::Extensions::FileProviders::IFileProvider
public class PhysicalFileProvider : IDisposable, Microsoft.Extensions.FileProviders.IFileProvider
type PhysicalFileProvider = class
    interface IFileProvider
    interface IDisposable
Public Class PhysicalFileProvider
Implements IDisposable, IFileProvider
Devralma
PhysicalFileProvider
Uygulamalar

Açıklamalar

"DOTNET_USE_POLLING_FILE_WATCHER" ortam değişkeni "1" veya "true" olarak ayarlandığında, çağrısı yapılacak Watch(String) PollingFileChangeToken .When the environment variable "DOTNET_USE_POLLING_FILE_WATCHER" is set to "1" or "true", calls to Watch(String) will use PollingFileChangeToken.

Oluşturucular

PhysicalFileProvider(String)

Belirtilen kök dizinde bir PhysicalFileProvider örneğini başlatır.Initializes a new instance of a PhysicalFileProvider at the given root directory.

PhysicalFileProvider(String, ExclusionFilters)

Belirtilen kök dizinde bir PhysicalFileProvider örneğini başlatır.Initializes a new instance of a PhysicalFileProvider at the given root directory.

Özellikler

Root

Bu örnek için kök dizin.The root directory for this instance.

UseActivePolling

Bu örneğin, PhysicalFileProvider Dosya değişikliklerini etkin bir şekilde yoklayıp yoklamadığını belirleyen bir değer alır veya ayarlar.Gets or sets a value that determines if this instance of PhysicalFileProvider actively polls for file changes.

Ne zaman true , IChangeToken Watch(String) ActiveChangeCallbacks pasif olması yerine dosya değişikliklerini (yani) etkin bir şekilde yokladığı zaman true .When true, the IChangeToken returned by Watch(String) actively polls for file changes (ActiveChangeCallbacks is true) instead of being passive.

Bu özellik yalnızca UsePollingFileWatcher ayarlandığında geçerlidir.This property is only effective when UsePollingFileWatcher is set.

UsePollingFileWatcher

Bu örneğinin PhysicalFileProvider Dosya değişikliklerini belirlemede yoklama kullanıp kullanmadığını belirleyen bir değer alır veya ayarlar.Gets or sets a value that determines if this instance of PhysicalFileProvider uses polling to determine file changes.

Varsayılan olarak, PhysicalFileProvider FileSystemWatcher için dosya değiştirme olaylarını dinlemek için kullanır Watch(String) .By default, PhysicalFileProvider uses FileSystemWatcher to listen to file change events for Watch(String). FileSystemWatcher bağlı sürücüler gibi bazı senaryolarda etkisiz hale getirilebilir.FileSystemWatcher is ineffective in some scenarios such as mounted drives. Dosya değişikliklerini etkin bir şekilde izlemek için yoklama gerekir.Polling is required to effectively watch for file changes.

Yöntemler

Dispose()

Sağlayıcıyı ortadan kaldırın.Disposes the provider. Sağlayıcı atıldıktan sonra değişiklik belirteçleri tetiklenemez.Change tokens may not trigger after the provider is disposed.

Dispose(Boolean)

Sağlayıcıyı ortadan kaldırın.Disposes the provider.

Equals(Object)

Belirtilen nesnenin geçerli nesneye eşit olup olmadığını belirler.Determines whether the specified object is equal to the current object.

(Devralındığı yer: Object)
Finalize()

İçin yıkıcısı PhysicalFileProvider .Destructor for PhysicalFileProvider.

GetDirectoryContents(String)

Belirtilen yoldaki bir dizini (varsa) numaralandırın.Enumerate a directory at the given path, if any.

GetFileInfo(String)

Yol kesimlerini doğrudan fiziksel dizinlere eşleyerek verilen yoldaki bir dosyayı bulun.Locate a file at the given path by directly mapping path segments to physical directories.

GetHashCode()

Varsayılan karma işlevi olarak işlev görür.Serves as the default hash function.

(Devralındığı yer: Object)
GetType()

TypeGeçerli örneği alır.Gets the Type of the current instance.

(Devralındığı yer: Object)
MemberwiseClone()

Geçerli bir basit kopyasını oluşturur Object .Creates a shallow copy of the current Object.

(Devralındığı yer: Object)
ToString()

Geçerli nesneyi temsil eden dizeyi döndürür.Returns a string that represents the current object.

(Devralındığı yer: Object)
Watch(String)

IChangeTokenBelirtilen için bir oluşturur filter .Creates an IChangeToken for the specified filter.

Glob desenleri tarafından yorumlanır Matcher .Globbing patterns are interpreted by Matcher.

Şunlara uygulanır