Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

FileSystemResource Class

A File backed resource.

For a list of all members of this type, see FileSystemResource Members .


[Visual Basic]
Public Class FileSystemResource
    Inherits AbstractResource
public class FileSystemResource : AbstractResource

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.


Supports resolution as both a FileInfo and a Uri.

Also supports the use of the ~ character. If the ~ character is the first character in a resource path (sans protocol), the ~ character will be replaced with the value of the System.AppDomain.CurrentDomain.BaseDirectory property (an example of this can be seen in the examples below).


Consider the example of an application that is running (has been launched from) the C:\App\ directory. The following resource paths will map to the following resources on the filesystem...

    strings.txt              C:\App\strings.txt
    ~/strings.txt            C:\App\strings.txt
    file://~/strings.txt     C:\App\strings.txt
    file://~/../strings.txt  C:\strings.txt
    ../strings.txt           C:\strings.txt
    ~/../strings.txt         C:\strings.txt
    // note that only a leading ~ character is resolved to the executing directory...
    stri~ngs.txt              C:\App\stri~ngs.txt


Namespace: Spring.Core.IO

Assembly: Spring.Core (in Spring.Core.dll)

See Also

FileSystemResource Members | Spring.Core.IO Namespace