Enapsulates a mutable (changable) site-relative URL. Note that "" is equivalent to the application root directory in YRL notation (the ~/ is implicit, always). QueryFindYrlVerifyID can be removed if external dependencies aren't allowed. It uses fbs.Articles.Index.FindPathByID() This class is designed to standardize path interpretation and conversion.
More...
|
| yrl () |
| Creates a default instance of yrl which points to the application root directory. More...
|
|
| yrl (string path) |
|
yrl | Copy () |
| Creates a deep copy of the yrl More...
|
|
override string | ToString () |
| Returns a site-root-relative path along with query paramaters More...
|
|
override bool | Equals (object obj) |
| Compares the hash codes of the two instances. More...
|
|
override int | GetHashCode () |
| Returns a unique hash code derived from the URL property of this instance More...
|
|
void | ChangeExtension (string newextension) |
| Deletes the old extension and replaces it with the specified extension. A leading '.' is not neccesary More...
|
|
yrl | GetNextAvailableDerivitive () |
| Returns the next unused filename similar to the current one,by incrementing (i) More...
|
|
string | CreateAbsoluteUrl (string protocolHostnameFolder) |
| Returns an absolute path to the current yrl using the specified base path More...
|
|
|
static yrl | FromString (string path) |
| Returns a yrl object from a path. Returns null if the path cannot be parsed. (Out of application bounds, or an invalid character). The tilde is an invalid character unless used as the app-relative specifier. More...
|
|
static yrl | FromYrlString (string path) |
| Creates an instance from a yrl-syntax string (virtual, but without ~/). Use FromString if you're not sure what type of syntax is used. More...
|
|
static yrl | FromRelativePhysicalString (string path) |
|
static yrl | FromPhysicalString (string path) |
| Creates a yrl Instance from the specified physical path. Throws an exception if the path is outside the application structure. More...
|
|
static string | GetAppFolderName () |
| either '/' or '/folder' like '/yf' or sometimes '/folder/folder' More...
|
|
static string | TrimStartAppFolder (string path) |
| Removes the application folder from the specified path. Leaves the leading forwardslash. Assuming the Application path is /yf, this function will transform /yf/home.aspx to /home.aspx and /yf/css/john.css to /css/john.css If the application is located in '/', nothing will be done to the path. Transforms yf/home.aspx to /home.aspx, yf\home.aspx to .aspx, .aspx to .aspx Won't work if the app folder has a child directory named the same! More...
|
|
static string | TrimStartServer (string path) |
|
static PathType | GetPathType (string path) |
| Returns the type of path More...
|
|
static string | NavigateUrlEncode (string text) |
|
static yrl | FromUri (Uri url) |
|
static | operator string (yrl url) |
|
static | operator yrl (string s) |
|
static yrl | Combine (yrl folder, yrl filenameOrSubdir) |
| Joins two yrls. Querystrings on either are discarded. More...
|
|
static bool | IsNullOrEmpty (yrl path) |
| Returns true if the yrl is null or empty (site root) More...
|
|
|
string | this[int index] [get] |
|
string | this[string name] [get, set] |
|
int | QueryID [get, set] |
| yrl.QueryString["id"] Returns -1 if not found, -2 if unparseable More...
|
|
yrl | QueryPath [get, set] |
| yrl.QueryString["path"]. Returns null if not found, throws exception if not parseable. More...
|
|
yrl | QueryDir [get, set] |
| yrl.QueryString["dir"]. Returns null if not found, throws exception if not parseable. More...
|
|
int | QueryFindID [get] |
| Tries to track down the ID by looking at QueryString["id"], then QueryString["path"]. Returns -1 if unsuccessful More...
|
|
string | Local [get] |
| Returns the physical filesystem path for this yrl More...
|
|
string | Virtual [get] |
| Returns the virtual path(~/...)of the base file without query paramaters. More...
|
|
string | VirtualURL [get] |
| Returns the virtual path (~/...) of the base file with query paramaters appended. More...
|
|
string | NavigateURL [get] |
| Returns a ~/ path designed for the Hyperlink.NavigateUrl property More...
|
|
string | URL [get] |
| Returns root-relative URL with query paramaters in the form 'articles/00001002 article.aspx' More...
|
|
string | URLEncoded [get] |
| Returns root-relative URL with query paramaters in the form 'articles/00001002%20article.aspx' More...
|
|
string | URLHtmlEncoded [get] |
| Returns root-relative URL with query paramaters in the form 'articles/00001002%20article.aspx'. Encodes special characters into HTML entities using Server.URLPathEncode More...
|
|
string | URLAnchorTarget [get] |
| Returns a domain-relative path in the form '/yf/articles/00001002%20article.aspx' More...
|
|
string | RelativeURL [get] |
| Returns relaitve URL with query paramaters in the form '../articles/00001002 article.aspx' More...
|
|
int | ID [get] |
| Returns the ID if a leading 8-digit ID is found in the base file. Returns -1 otherwise More...
|
|
int | FirstID [get] |
| Returns first leading ID found in a segment of the path. More...
|
|
bool | FileExists [get] |
| Returns true if BaseFile exists as a local file. More...
|
|
bool | DirExists [get] |
| Returns true if BaseFile exists as a local Directory. More...
|
|
DirectoryInfo | DirInfo [get] |
| Returns a DirectoryInfo object for BaseFile if it is a directory. If not, it returns the parent directory More...
|
|
yrl | Parent [get] |
| Returns a yrl of the parent directory. If the current yrl is already the root, returns null; Use More...
|
|
yrl | Directory [get] |
| Returns the directory portion of this yrl. More...
|
|
static yrl | Root [get] |
| Returns an instance of yrl that points to the application root. More...
|
|
static yrl | Current [get] |
| Returns the REAL file that is being executed. Falls back to CurrentBrowserUrl if unavailable. Unavailable if UrlRewritingNet isn't in use More...
|
|
static yrl | CurrentBrowserURL [get] |
| Retreieves the current URL from HttpContext.Current.Request.Url (pre-rewrite path) More...
|
|
static yrl | Referrer [get] |
| Returns null if unavailable More...
|
|
bool | IsEmpty [get] |
| An empty yrl signifies the application root. This verifies both the path and the querystring are empty. More...
|
|
bool | IsRoot [get] |
| Returns true if the basefile is empty (the root) (the QueryString can have data). Use IsEmpty to check that both are empty. More...
|
|
bool | IsInRoot [get] |
| Returns true if this path has no parent directory (the parent directory is the root). More...
|
|
string | Name [get] |
| Returns the name of the directory (like 'archives') if it is one, and the name of the file (like 'universal.css') if it is a file. More...
|
|
string | NameWithoutExtension [get] |
| Returns the name of BaseFile without the extension. More...
|
|
string | PrettyTitle [get] |
| Returns the filename without the ID or extension, converts underscores to spaces, and trims the string. More...
|
|
string | FilenameWithoutIdAndExtension [get] |
| Returns the filename minus path information, extensions, or Article ID. More...
|
|
string | Extension [get] |
| Returns the extension of BaseFile in the form '.aspx' More...
|
|
bool | IsAspx [get] |
| returns true if BaseFile ends with .aspx More...
|
|
bool | HasExtension [get] |
|
bool | IsCodeFile [get] |
| returns true if BaseFile ends with .cs or .vb More...
|
|
yrl | FindAssociatedMarkupFile [get] |
| If this is .aspx.cs or .aspx.vb file, attempts to find and return the associated .aspx file. If this is a .aspx file, returns the current instance. Otherwise, this returns null; More...
|
|
yrl | FindAssociatedCodeFile [get] |
| If this is an .aspx file, attempts to find and return an associated .aspx.cs or .aspx.vb file. If this is .aspx.cs or .aspx.vb file, returns the current instance. Otherwise, this returns null; More...
|
|
Enapsulates a mutable (changable) site-relative URL. Note that "" is equivalent to the application root directory in YRL notation (the ~/ is implicit, always). QueryFindYrlVerifyID can be removed if external dependencies aren't allowed. It uses fbs.Articles.Index.FindPathByID() This class is designed to standardize path interpretation and conversion.
Definition at line 50 of file yrl.cs.