DatabaseFileProvider Class
              
              
              Namespace: Stride.Core.IO
              Assembly: Stride.Core.Serialization.dll
              
              
              
              
              
              
              
                 Derived from DatabaseFileProvider: 
              
              
              
              
              
                public sealed class DatabaseFileProvider : VirtualFileProviderBase, IVirtualFileProvider, IDisposable
               
              
              
              
              
              
                
                  
                    | Name | 
                    Description | 
                    
                        
                  
                      
                         
              
                      | Constructors
               | 
              
                          
                          | 
                              
                           | 
                          DatabaseFileProvider(IContentIndexMap, ObjectDatabase, String) | 
                           | 
                          
                          
                          | 
                              
                           | 
                          DatabaseFileProvider(ObjectDatabase, String) | 
                           | 
                          
              
                     
              
                      | Fields
               | 
              
                          
                          | 
                              
                           | 
                          ObjectIdUrl | 
                          URL prefix for ObjectId references. 
 | 
                          
              
                     
              
                      | Properties
               | 
              
                          
                          | 
                              
                           | 
                          ContentIndexMap | 
                           | 
                          
                          
                          | 
                              
                           | 
                          ObjectDatabase | 
                           | 
                          
              
                     
              
                      | Methods
               | 
              
                          
                          | 
                              
                           | 
                          FileExists(String) | 
                           | 
                          
                          
                          | 
                              
                           | 
                          FileSize(String) | 
                           | 
                          
                          
                          | 
                              
                           | 
                          GetAbsolutePath(String) | 
                           | 
                          
                          
                          | 
                              
                           | 
                          ListFiles(String, String, VirtualSearchOption) | 
                           | 
                          
                          
                          | 
                              
                           | 
                          OpenStream(String, VirtualFileMode, VirtualFileAccess, VirtualFileShare, StreamFlags) | 
                          Opens a Stream from the specified path. 
 | 
                          
                          
                          | 
                              
                           | 
                          ResolveObjectId(String, out ObjectId) | 
                          Resolves the given VFS URL into a ObjectId and its DatabaseFileProvider. 
 | 
                          
              
              
                  
                
  
              
                     
              
                
                  |
                  Improve this Doc
                
                
                  View Source
                
              
              
                Constructors
              
                
              
              
              
              
              
              DatabaseFileProvider(IContentIndexMap, ObjectDatabase, String)
              
              
              
              
              
                public DatabaseFileProvider(IContentIndexMap contentIndexMap, ObjectDatabase objectDatabase, string mountPoint = null)
               
              
              Parameters
              
              
              
              
              
              
              DatabaseFileProvider(ObjectDatabase, String)
              
              
              
              
              
                public DatabaseFileProvider(ObjectDatabase objectDatabase, string mountPoint = null)
               
              
              Parameters
              
                
                  
                    | Type | 
                    Name | 
                    Description | 
                  
                
                
                  
                    | ObjectDatabase | 
                    objectDatabase | 
                     | 
                  
                  
                    | System.String | 
                    mountPoint | 
                     | 
                  
                
              
                     
              
                
                  |
                  Improve this Doc
                
                
                  View Source
                
              
              
                Fields
              
                
              
              
              
              
              ObjectIdUrl
              
              URL prefix for ObjectId references.
 
              
              
              
                public static readonly string ObjectIdUrl
               
              
              Field Value
              
                
                  
                    | Type | 
                    Description | 
                  
                
                
                  
                    | System.String | 
                     | 
                  
                
              
                     
              
                
                  |
                  Improve this Doc
                
                
                  View Source
                
              
              
                Properties
              
                
              
              
              
              
              
              ContentIndexMap
              
              
              
              
              
                public IContentIndexMap ContentIndexMap { get; }
               
              
              Property Value
              
              
              
              
              
              
              ObjectDatabase
              
              
              
              
              
                public ObjectDatabase ObjectDatabase { get; }
               
              
              Property Value
              
                     
              
                
                  |
                  Improve this Doc
                
                
                  View Source
                
              
              
                Methods
              
                
              
              
              
              
              
              FileExists(String)
              
              
              
              
              
                public override bool FileExists(string url)
               
              
              Parameters
              
                
                  
                    | Type | 
                    Name | 
                    Description | 
                  
                
                
                  
                    | System.String | 
                    url | 
                     | 
                  
                
              
              Returns
              
                
                  
                    | Type | 
                    Description | 
                  
                
                
                  
                    | System.Boolean | 
                     | 
                  
                
              
              Overrides
              
              
              
              
              
              
              FileSize(String)
              
              
              
              
              
                public override long FileSize(string url)
               
              
              Parameters
              
                
                  
                    | Type | 
                    Name | 
                    Description | 
                  
                
                
                  
                    | System.String | 
                    url | 
                     | 
                  
                
              
              Returns
              
                
                  
                    | Type | 
                    Description | 
                  
                
                
                  
                    | System.Int64 | 
                     | 
                  
                
              
              Overrides
              
              
              
              
              
              
              GetAbsolutePath(String)
              
              
              
              
              
                public override string GetAbsolutePath(string url)
               
              
              Parameters
              
                
                  
                    | Type | 
                    Name | 
                    Description | 
                  
                
                
                  
                    | System.String | 
                    url | 
                     | 
                  
                
              
              Returns
              
                
                  
                    | Type | 
                    Description | 
                  
                
                
                  
                    | System.String | 
                     | 
                  
                
              
              Overrides
              
              
              
              
              
              
              ListFiles(String, String, VirtualSearchOption)
              
              
              
              
              
                public override string[] ListFiles(string url, string searchPattern, VirtualSearchOption searchOption)
               
              
              Parameters
              
                
                  
                    | Type | 
                    Name | 
                    Description | 
                  
                
                
                  
                    | System.String | 
                    url | 
                     | 
                  
                  
                    | System.String | 
                    searchPattern | 
                     | 
                  
                  
                    | VirtualSearchOption | 
                    searchOption | 
                     | 
                  
                
              
              Returns
              
                
                  
                    | Type | 
                    Description | 
                  
                
                
                  
                    | System.String[] | 
                     | 
                  
                
              
              Overrides
              
              
              
              
              
              
              OpenStream(String, VirtualFileMode, VirtualFileAccess, VirtualFileShare, StreamFlags)
              
              Opens a Stream from the specified path.
 
              
              
              
                public override Stream OpenStream(string url, VirtualFileMode mode, VirtualFileAccess access, VirtualFileShare share = VirtualFileShare.Read, StreamFlags streamFlags = StreamFlags.None)
               
              
              Parameters
              
              Returns
              
                
                  
                    | Type | 
                    Description | 
                  
                
                
                  
                    | System.IO.Stream | 
                    The opened stream. 
 | 
                  
                
              
              Overrides
              
              
              
              
              
              
              ResolveObjectId(String, out ObjectId)
              
              Resolves the given VFS URL into a ObjectId and its DatabaseFileProvider.
 
              
              
              
                public static DatabaseFileProvider ResolveObjectId(string url, out ObjectId objectId)
               
              
              Parameters
              
                
                  
                    | Type | 
                    Name | 
                    Description | 
                  
                
                
                  
                    | System.String | 
                    url | 
                    The URL to resolve. 
 | 
                  
                  
                    | ObjectId | 
                    objectId | 
                    The object id. 
 | 
                  
                
              
              Returns
              
              
              
 
              
               
              
              
              
              
              
              
              Extension Methods