TraceLab Component Library
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
RPlugin.Core.RController Class Reference

Static Package Functions

static void RequirePackages (string RScriptPath, params string[] args)
 
static RScriptResult RunScript (string RScriptPath, string script, params object[] args)
 Calls RScript executable and runs the given script as a hidden process More...
 
static RScriptResult RunScriptAdmin (string RScriptPath, string script, params object[] args)
 Calls RScript executable and runs the given script with administrative priveleges Must be run in a visible window Fails if the user denies priveleges More...
 
static void ClearCache ()
 Removes all files and subdirectories from the cache More...
 
static void ClearCache (string path)
 Removes all files and subdirectories from the cache recursively More...
 
static FileStream CreateCacheFile (string name, bool overwrite)
 Creates a new file in the cache. More...
 
static DirectoryInfo CreateCacheDirectory (string name, bool checkExists)
 Creates a new directory in the cache. More...
 
static void ExtractResource (string dir, string ResourceName)
 Extracts an embedded resource to disk More...
 
static string GetResourceContents (string ResourceName)
 Returns the (textual) contents of an embedded resource More...
 
static void RequireSetupRun ()
 Checks to see if setup has been run. Throws an error if it has not. External code can check HasSetupRun themselves for this value. More...
 

Static Package Attributes

static bool HasSetupRun
 
static string Temp
 
static string Cache
 
static string Scripts
 

Detailed Description

Definition at line 26 of file RController.cs.

Member Function Documentation

static void RPlugin.Core.RController.ClearCache ( )
staticpackage

Removes all files and subdirectories from the cache

Definition at line 143 of file RController.cs.

static void RPlugin.Core.RController.ClearCache ( string  path)
staticpackage

Removes all files and subdirectories from the cache recursively

Parameters
pathpath to clear

Definition at line 152 of file RController.cs.

static DirectoryInfo RPlugin.Core.RController.CreateCacheDirectory ( string  name,
bool  checkExists 
)
staticpackage

Creates a new directory in the cache.

Returns
Directory info, null if checkExists && exists

Definition at line 208 of file RController.cs.

static FileStream RPlugin.Core.RController.CreateCacheFile ( string  name,
bool  overwrite 
)
staticpackage

Creates a new file in the cache.

Parameters
nameName of file
overwriteOverwrites an existing file if true.
Returns
FileStream reference

Definition at line 190 of file RController.cs.

static void RPlugin.Core.RController.ExtractResource ( string  dir,
string  ResourceName 
)
staticpackage

Extracts an embedded resource to disk

Parameters
dirTarget directory
ResourceNameResource short name

Definition at line 227 of file RController.cs.

static string RPlugin.Core.RController.GetResourceContents ( string  ResourceName)
staticpackage

Returns the (textual) contents of an embedded resource

Parameters
ResourceNameResource short name
Returns
Resource contents

Definition at line 238 of file RController.cs.

static void RPlugin.Core.RController.RequirePackages ( string  RScriptPath,
params string[]  args 
)
staticpackage

Definition at line 59 of file RController.cs.

static void RPlugin.Core.RController.RequireSetupRun ( )
staticpackage

Checks to see if setup has been run. Throws an error if it has not. External code can check HasSetupRun themselves for this value.

Definition at line 248 of file RController.cs.

static RScriptResult RPlugin.Core.RController.RunScript ( string  RScriptPath,
string  script,
params object[]  args 
)
staticpackage

Calls RScript executable and runs the given script as a hidden process

Parameters
RScriptPathPath to RScript executable
scriptScript location
argsScript arguments
Returns
Script output

Definition at line 88 of file RController.cs.

static RScriptResult RPlugin.Core.RController.RunScriptAdmin ( string  RScriptPath,
string  script,
params object[]  args 
)
staticpackage

Calls RScript executable and runs the given script with administrative priveleges Must be run in a visible window Fails if the user denies priveleges

Parameters
RScriptPathPath to RScript executable
scriptScript location
argsScript arguments
Returns
Script output

Definition at line 123 of file RController.cs.

Member Data Documentation

string RPlugin.Core.RController.Cache
staticpackage

Definition at line 30 of file RController.cs.

bool RPlugin.Core.RController.HasSetupRun
staticpackage

Definition at line 28 of file RController.cs.

string RPlugin.Core.RController.Scripts
staticpackage

Definition at line 31 of file RController.cs.

string RPlugin.Core.RController.Temp
staticpackage

Definition at line 29 of file RController.cs.


The documentation for this class was generated from the following file: