AtomicNET : AtomicEngine Namespace

FileSystem Class

Subsystem for file and directory operations and access control.

Syntax

public class FileSystem : AObject

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

Members

See Also: Inherited members from AObject.

Public Constructors

Documentation for this section has not yet been entered.
Construct.

Public Fields

nativeInstance IntPtr . Documentation for this section has not yet been entered. (Inherited from RefCounted.)

Public Properties

[read-only]
Category string . Documentation for this section has not yet been entered. (Inherited from AObject.)
[read-only]
Context Context . Documentation for this section has not yet been entered. (Inherited from AObject.)
[read-only]
CurrentDir string . Documentation for this section has not yet been entered.
[read-only]
EventSender AObject . Documentation for this section has not yet been entered. (Inherited from AObject.)
ExecuteConsoleCommands bool . Documentation for this section has not yet been entered.
InstantiationType InstantiationType . Documentation for this section has not yet been entered. (Inherited from RefCounted.)
[read-only]
NativeInstance IntPtr . Documentation for this section has not yet been entered. (Inherited from RefCounted.)
[read-only]
ProgramDir string . Documentation for this section has not yet been entered.
[read-only]
TypeName string . Documentation for this section has not yet been entered. (Inherited from AObject.)
[read-only]
TypeName string . Documentation for this section has not yet been entered. (Inherited from RefCounted.)
[read-only]
TypeNameStatic string . Documentation for this section has not yet been entered. (Inherited from AObject.)
[read-only]
UserDocumentsDir string . Documentation for this section has not yet been entered.

Public Methods

AddRef ()
Increment reference count. Can also be called outside of a SharedPtr for traditional reference counting. (Inherited from RefCounted.)
AddRefSilent ()
Increment reference count. Do not call any lifetime book keeping (Inherited from RefCounted.)
CheckAccess (string) : bool
Check if a path is allowed to be accessed. If no paths are registered, all are allowed.
Copy (string, string) : bool
Copy a file. Return true if successful.
CopyDir (string, string) : bool
Documentation for this section has not yet been entered.
CreateDir (string) : bool
Create a directory.
CreateDirs (string, string) : bool
Documentation for this section has not yet been entered.
CreateDirsRecursive (string) : bool
Documentation for this section has not yet been entered.
static
csb_Atomic_FileSystem_GetClassIDStatic () : IntPtr
Documentation for this section has not yet been entered.
Delete (string) : bool
Delete a file. Return true if successful.
DirExists (string) : bool
Check if a directory exists.
Exists (string) : bool
Check if a file or directory exists at the specified path
FileExists (string) : bool
Check if a file exists.
GetAppPreferencesDir (string, string) : string
Return the application preferences directory.
GetCategory () : string
Return object category. Categories are (optionally) registered along with the object factory. Return an empty string if the object category is not registered. (Inherited from AObject.)
GetContext () : Context
Return execution context. (Inherited from AObject.)
GetCurrentDir () : string
Return the absolute current working directory.
GetEventSender () : AObject
Return active event sender. Null outside event handling. (Inherited from AObject.)
GetExecuteConsoleCommands () : bool
Return whether is executing engine console commands as OS-specific system command.
GetInstantiationType () : InstantiationType
Documentation for this section has not yet been entered. (Inherited from RefCounted.)
GetLastModifiedTime (string) : uint
Returns the file's last modified time as seconds since 1.1.1970, or 0 if can not be accessed.
GetProgramDir () : string
Return the program's directory. If it does not contain the Urho3D default CoreData and Data directories, and the current working directory does, return the working directory instead.
GetSubsystem (StringHash) : AObject
Return subsystem by type. (Inherited from AObject.)
override
GetTypeName () : string
Return type name. (Inherited from AObject.)
GetTypeName () : string
Documentation for this section has not yet been entered. (Inherited from RefCounted.)
GetUserDocumentsDir () : string
Return the user documents directory.
HasEventHandlers () : bool
Return whether has subscribed to any event. (Inherited from AObject.)
HasRegisteredPaths () : bool
Return whether paths have been registered.
HasSubscribedToEvent (StringHash) : bool
Return whether has subscribed to an event without specific sender. (Inherited from AObject.)
HasSubscribedToEvent (AObject, StringHash) : bool
Return whether has subscribed to a specific sender's event. (Inherited from AObject.)
IsInstanceOf (StringHash) : bool
Check current instance is type of specified type. (Inherited from AObject.)
override
IsObject () : bool
Documentation for this section has not yet been entered. (Inherited from AObject.)
IsObject () : bool
Documentation for this section has not yet been entered. (Inherited from RefCounted.)
Refs () : int
Return reference count. (Inherited from RefCounted.)
RegisterPath (string)
Register a path as allowed to access. If no paths are registered, all are allowed. Registering allowed paths is considered securing the Urho3D execution environment: running programs and opening files externally through the system will fail afterward.
ReleaseRef ()
Decrement reference count and delete self if no more references. Can also be called outside of a SharedPtr for traditional reference counting. (Inherited from RefCounted.)
RemoveDir (string, bool) : bool
Documentation for this section has not yet been entered.
Rename (string, string) : bool
Rename a file. Return true if successful.
SendEvent (string, ScriptVariantMap)
Documentation for this section has not yet been entered. (Inherited from AObject.)
SetCurrentDir (string) : bool
Set the current working directory.
SetExecuteConsoleCommands (bool)
Set whether to execute engine console commands as OS-specific system command.
SetInstantiationType (InstantiationType)
Documentation for this section has not yet been entered. (Inherited from RefCounted.)
SetLastModifiedTime (string, uint) : bool
Set a file's last modified time as seconds since 1.1.1970. Return true on success.
SubscribeToEvent (string, EventDelegate)
Documentation for this section has not yet been entered. (Inherited from AObject.)
SubscribeToEvent (uint, EventDelegate)
Documentation for this section has not yet been entered. (Inherited from AObject.)
SubscribeToEvent (AObject, string, EventDelegate)
Documentation for this section has not yet been entered. (Inherited from AObject.)
SubscribeToEvent (AObject, uint, EventDelegate)
Documentation for this section has not yet been entered. (Inherited from AObject.)
SubscribeToEvent<T> (NativeEventDelegate<T>)
Documentation for this section has not yet been entered. (Inherited from AObject.)
SubscribeToEvent<T> (AObject, NativeEventDelegate<T>)
Documentation for this section has not yet been entered. (Inherited from AObject.)
SystemCommand (string, bool) : int
Run a program using the command interpreter, block until it exits and return the exit code. Will fail if any allowed paths are defined.
SystemCommandAsync (string) : uint
Run a program using the command interpreter asynchronously. Return a request ID or M_MAX_UNSIGNED if failed. The exit code will be posted together with the request ID in an AsyncExecFinished event. Will fail if any allowed paths are defined.
SystemOpen (string, string) : bool
Open a file in an external program, with mode such as "edit" optionally specified. Will fail if any allowed paths are defined.
UnsubscribeFromAllEvents ()
Documentation for this section has not yet been entered. (Inherited from AObject.)
UnsubscribeFromEvent (StringHash)
Unsubscribe from an event. (Inherited from AObject.)
UnsubscribeFromEvent (uint)
Documentation for this section has not yet been entered. (Inherited from AObject.)
UnsubscribeFromEvent (AObject, StringHash)
Unsubscribe from a specific sender's event. (Inherited from AObject.)
UnsubscribeFromEvent<T> ()
Documentation for this section has not yet been entered. (Inherited from AObject.)
UnsubscribeFromEventReceiver (AObject)
Unsubscribe from event for specific receiver (where the event handler isn't necessarily in the subscribed object) (Inherited from AObject.)
UnsubscribeFromEvents (AObject)
Unsubscribe from a specific sender's events. (Inherited from AObject.)
WeakRefs () : int
Return weak reference count. (Inherited from RefCounted.)

Member Details

FileSystem Constructor

Documentation for this section has not yet been entered.

Syntax

public FileSystem ()

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

FileSystem Constructor

Construct.

Syntax

public FileSystem (IntPtr native)

Parameters

native
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

CheckAccess Method

Check if a path is allowed to be accessed. If no paths are registered, all are allowed.

Syntax

public bool CheckAccess (string pathName)

Parameters

pathName
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

Copy Method

Copy a file. Return true if successful.

Syntax

public bool Copy (string srcFileName, string destFileName)

Parameters

srcFileName
Documentation for this section has not yet been entered.
destFileName
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

CopyDir Method

Documentation for this section has not yet been entered.

Syntax

public bool CopyDir (string directoryIn, string directoryOut)

Parameters

directoryIn
Documentation for this section has not yet been entered.
directoryOut
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

CreateDir Method

Create a directory.

Syntax

public bool CreateDir (string pathName)

Parameters

pathName
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

CreateDirs Method

Documentation for this section has not yet been entered.

Syntax

public bool CreateDirs (string root, string subdirectory)

Parameters

root
Documentation for this section has not yet been entered.
subdirectory
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

CreateDirsRecursive Method

Documentation for this section has not yet been entered.

Syntax

public bool CreateDirsRecursive (string directoryIn)

Parameters

directoryIn
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

csb_Atomic_FileSystem_GetClassIDStatic Method

Documentation for this section has not yet been entered.

Syntax

public static IntPtr csb_Atomic_FileSystem_GetClassIDStatic ()

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

CurrentDir Property

Documentation for this section has not yet been entered.

Syntax

public string CurrentDir { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

Delete Method

Delete a file. Return true if successful.

Syntax

public bool Delete (string fileName)

Parameters

fileName
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

DirExists Method

Check if a directory exists.

Syntax

public bool DirExists (string pathName)

Parameters

pathName
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

ExecuteConsoleCommands Property

Documentation for this section has not yet been entered.

Syntax

public bool ExecuteConsoleCommands { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

Exists Method

Check if a file or directory exists at the specified path

Syntax

public bool Exists (string pathName)

Parameters

pathName
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

FileExists Method

Check if a file exists.

Syntax

public bool FileExists (string fileName)

Parameters

fileName
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

GetAppPreferencesDir Method

Return the application preferences directory.

Syntax

public string GetAppPreferencesDir (string org, string app)

Parameters

org
Documentation for this section has not yet been entered.
app
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

GetCurrentDir Method

Return the absolute current working directory.

Syntax

public string GetCurrentDir ()

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

GetExecuteConsoleCommands Method

Return whether is executing engine console commands as OS-specific system command.

Syntax

public bool GetExecuteConsoleCommands ()

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

GetLastModifiedTime Method

Returns the file's last modified time as seconds since 1.1.1970, or 0 if can not be accessed.

Syntax

public uint GetLastModifiedTime (string fileName)

Parameters

fileName
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

GetProgramDir Method

Return the program's directory. If it does not contain the Urho3D default CoreData and Data directories, and the current working directory does, return the working directory instead.

Syntax

public string GetProgramDir ()

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

GetUserDocumentsDir Method

Return the user documents directory.

Syntax

public string GetUserDocumentsDir ()

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

HasRegisteredPaths Method

Return whether paths have been registered.

Syntax

public bool HasRegisteredPaths ()

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

ProgramDir Property

Documentation for this section has not yet been entered.

Syntax

public string ProgramDir { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

RegisterPath Method

Register a path as allowed to access. If no paths are registered, all are allowed. Registering allowed paths is considered securing the Urho3D execution environment: running programs and opening files externally through the system will fail afterward.

Syntax

public void RegisterPath (string pathName)

Parameters

pathName
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

RemoveDir Method

Documentation for this section has not yet been entered.

Syntax

public bool RemoveDir (string directoryIn, bool recursive)

Parameters

directoryIn
Documentation for this section has not yet been entered.
recursive
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

Rename Method

Rename a file. Return true if successful.

Syntax

public bool Rename (string srcFileName, string destFileName)

Parameters

srcFileName
Documentation for this section has not yet been entered.
destFileName
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

SetCurrentDir Method

Set the current working directory.

Syntax

public bool SetCurrentDir (string pathName)

Parameters

pathName
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

SetExecuteConsoleCommands Method

Set whether to execute engine console commands as OS-specific system command.

Syntax

public void SetExecuteConsoleCommands (bool enable)

Parameters

enable
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

SetLastModifiedTime Method

Set a file's last modified time as seconds since 1.1.1970. Return true on success.

Syntax

public bool SetLastModifiedTime (string fileName, uint newTime)

Parameters

fileName
Documentation for this section has not yet been entered.
newTime
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

SystemCommand Method

Run a program using the command interpreter, block until it exits and return the exit code. Will fail if any allowed paths are defined.

Syntax

public int SystemCommand (string commandLine, bool redirectStdOutToLog)

Parameters

commandLine
Documentation for this section has not yet been entered.
redirectStdOutToLog
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

SystemCommandAsync Method

Run a program using the command interpreter asynchronously. Return a request ID or M_MAX_UNSIGNED if failed. The exit code will be posted together with the request ID in an AsyncExecFinished event. Will fail if any allowed paths are defined.

Syntax

public uint SystemCommandAsync (string commandLine)

Parameters

commandLine
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

SystemOpen Method

Open a file in an external program, with mode such as "edit" optionally specified. Will fail if any allowed paths are defined.

Syntax

public bool SystemOpen (string fileName, string mode)

Parameters

fileName
Documentation for this section has not yet been entered.
mode
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

UserDocumentsDir Property

Documentation for this section has not yet been entered.

Syntax

public string UserDocumentsDir { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0