Folder

Overview

Class for accessing folders on the file system.

Location

  • Reference: Island.fx
  • Namespace: RemObjects.Elements.System
  • Platforms: Android, Fuchsia, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, visionOS, visionOS Simulator, watchOS, watchOS Simulator, Windows
  • Ancestry: BaseFile | Folder

 

constructor    (declared in Object)

 

constructor

 

Folder()

 

init()

 

Folder()

 

Sub New()

constructor (not nullable String)

constructor

 

constructor(aFullName: not nullable String)

 

Folder(String! aFullName)

 

init(_ aFullName: String)

 

Folder(String aFullName)

 

Sub New(aFullName As String)

Parameters:

  • aFullName: Full name of the folder.

CreateFile

Creates a new file instance.

 

method CreateFile(FileName: String; FailIfExists: Boolean): File

 

File CreateFile(String FileName, Boolean FailIfExists)

 

func CreateFile(_ FileName: String, _ FailIfExists: Boolean) -> File

 

File CreateFile(String FileName, Boolean FailIfExists)

 

Function CreateFile(FileName As String, FailIfExists As Boolean) As File

Parameters:

  • FileName: filename
  • FailIfExists: if true fails if the file already exists.

CreateFolder

Creates a new folder.

 

class method CreateFolder(FolderName: String; FailIfExists: Boolean): Folder

 

static Folder CreateFolder(String FolderName, Boolean FailIfExists)

 

static func CreateFolder(_ FolderName: String, _ FailIfExists: Boolean) -> Folder

 

static Folder CreateFolder(String FolderName, Boolean FailIfExists)

 

Shared Function CreateFolder(FolderName As String, FailIfExists As Boolean) As Folder

Parameters:

  • FolderName: Full name of the folder.
  • FailIfExists: if true fails if the folder already exists.

CreateSubfolder

Creates a subfolder.

 

method CreateSubfolder(SubfolderName: String; FailIfExists: Boolean): Folder

 

Folder CreateSubfolder(String SubfolderName, Boolean FailIfExists)

 

func CreateSubfolder(_ SubfolderName: String, _ FailIfExists: Boolean) -> Folder

 

Folder CreateSubfolder(String SubfolderName, Boolean FailIfExists)

 

Function CreateSubfolder(SubfolderName As String, FailIfExists As Boolean) As Folder

Parameters:

  • SubfolderName: Name of the folder
  • FailIfExists: if true fails if the folder already exists.

DateAccessed    (declared in BaseFile)

Date this file system item was last accessed.

 

property DateAccessed: DateTime read;

 

DateTime DateAccessed { get; }

 

var DateAccessed: DateTime { get{} }

 

DateTime DateAccessed { __get; }

 

ReadOnly Property DateAccessed() As DateTime

DateCreated    (declared in BaseFile)

Date this filesystem element was created.

 

property DateCreated: DateTime read;

 

DateTime DateCreated { get; }

 

var DateCreated: DateTime { get{} }

 

DateTime DateCreated { __get; }

 

ReadOnly Property DateCreated() As DateTime

DateModified    (declared in BaseFile)

Date this filesystem element was last modif

 

property DateModified: DateTime read;

 

DateTime DateModified { get; }

 

var DateModified: DateTime { get{} }

 

DateTime DateModified { __get; }

 

ReadOnly Property DateModified() As DateTime

Delete  override virtual

 

method Delete

 

void Delete()

 

func Delete()

 

void Delete()

 

Sub Delete()

Delete (String)

 

class method Delete(aFolder: String)

 

static void Delete(String aFolder)

 

static func Delete(_ aFolder: String)

 

static void Delete(String aFolder)

 

Shared Sub Delete(aFolder As String)

Parameters:

  • aFolder:

Equals  virtual    (declared in Object)

Default constructor.

 

method Equals(aOther: Object): Boolean

 

Boolean Equals(Object aOther)

 

func Equals(_ aOther: Object) -> Boolean

 

Boolean Equals(Object aOther)

 

Function Equals(aOther As Object) As Boolean

Parameters:

  • aOther: the reference to compare this with.

Exists  override virtual

Check if this folder exists.

 

method Exists: Boolean

 

Boolean Exists()

 

func Exists() -> Boolean

 

Boolean Exists()

 

Function Exists() As Boolean

Exists (String): Boolean

 

class method Exists(aFolder: String): Boolean

 

static Boolean Exists(String aFolder)

 

static func Exists(_ aFolder: String) -> Boolean

 

static Boolean Exists(String aFolder)

 

Shared Function Exists(aFolder As String) As Boolean

Parameters:

  • aFolder:

Extension    (declared in BaseFile)

Returns the extension of this file/folder preceded with a .

 

property Extension: not nullable String read;

 

String! Extension { get; }

 

var Extension: String { get{} }

 

String Extension { __get; }

 

ReadOnly Property Extension() As String

Finalize  protected virtual    (declared in Object)

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

 

Sub Finalize()

FullName    (declared in BaseFile)

Returns the full name including path.

 

property FullName: not nullable String read;

 

String! FullName { get; }

 

var FullName: String { get{} }

 

String FullName { __get; }

 

ReadOnly Property FullName() As String

GetFile

Gets a file in this folder.

 

method GetFile(FileName: String): File

 

File GetFile(String FileName)

 

func GetFile(_ FileName: String) -> File

 

File GetFile(String FileName)

 

Function GetFile(FileName As String) As File

Parameters:

  • FileName: Name of the file to look for

GetFiles

Gets a list of all files in this folder.

 

method GetFiles: not nullable ImmutableList<File>

 

ImmutableList<File>! GetFiles()

 

func GetFiles() -> ImmutableList<File>

 

ImmutableList<File> GetFiles()

 

Function GetFiles() As ImmutableList<File>

GetHandle  protected    (declared in BaseFile) Windows

Returns a handle to this file.

 

method GetHandle: HANDLE

 

HANDLE GetHandle()

 

func GetHandle() -> HANDLE

 

HANDLE GetHandle()

 

Function GetHandle() As HANDLE

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

 

Function GetHashCode() As Int32

GetSubfolders

Gets a list of all subfolders.

 

method GetSubfolders: not nullable ImmutableList<Folder>

 

ImmutableList<Folder>! GetSubfolders()

 

func GetSubfolders() -> ImmutableList<Folder>

 

ImmutableList<Folder> GetSubfolders()

 

Function GetSubfolders() As ImmutableList<Folder>

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

Name    (declared in BaseFile)

Returns the name without path.

 

property Name: not nullable String read;

 

String! Name { get; }

 

var Name: String { get{} }

 

String Name { __get; }

 

ReadOnly Property Name() As String

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

Rename

Rename a folder.

 

method Rename(NewName: String): Folder

 

Folder Rename(String NewName)

 

func Rename(_ NewName: String) -> Folder

 

Folder Rename(String NewName)

 

Function Rename(NewName As String) As Folder

Parameters:

  • NewName: new name for this folder; returns the new folder instance.

Separator

Separator for folder names in a path.

 

class property Separator: Char read;

 

class Char Separator { get; }

 

static var Separator: Char { get{} }

 

class Char Separator { __get; }

 

Shared ReadOnly Property Separator() As Char

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

Validate  protected override virtual

 

method Validate

 

void Validate()

 

func Validate()

 

void Validate()

 

Sub Validate()

 

DateAccessed    (declared in BaseFile)

Date this file system item was last accessed.

 

property DateAccessed: DateTime read;

 

DateTime DateAccessed { get; }

 

var DateAccessed: DateTime { get{} }

 

DateTime DateAccessed { __get; }

 

ReadOnly Property DateAccessed() As DateTime

DateCreated    (declared in BaseFile)

Date this filesystem element was created.

 

property DateCreated: DateTime read;

 

DateTime DateCreated { get; }

 

var DateCreated: DateTime { get{} }

 

DateTime DateCreated { __get; }

 

ReadOnly Property DateCreated() As DateTime

DateModified    (declared in BaseFile)

Date this filesystem element was last modif

 

property DateModified: DateTime read;

 

DateTime DateModified { get; }

 

var DateModified: DateTime { get{} }

 

DateTime DateModified { __get; }

 

ReadOnly Property DateModified() As DateTime

Extension    (declared in BaseFile)

Returns the extension of this file/folder preceded with a .

 

property Extension: not nullable String read;

 

String! Extension { get; }

 

var Extension: String { get{} }

 

String Extension { __get; }

 

ReadOnly Property Extension() As String

FullName    (declared in BaseFile)

Returns the full name including path.

 

property FullName: not nullable String read;

 

String! FullName { get; }

 

var FullName: String { get{} }

 

String FullName { __get; }

 

ReadOnly Property FullName() As String

Name    (declared in BaseFile)

Returns the name without path.

 

property Name: not nullable String read;

 

String! Name { get; }

 

var Name: String { get{} }

 

String Name { __get; }

 

ReadOnly Property Name() As String

Separator

Separator for folder names in a path.

 

class property Separator: Char read;

 

class Char Separator { get; }

 

static var Separator: Char { get{} }

 

class Char Separator { __get; }

 

Shared ReadOnly Property Separator() As Char

 

CreateFolder

Creates a new folder.

 

class method CreateFolder(FolderName: String; FailIfExists: Boolean): Folder

 

static Folder CreateFolder(String FolderName, Boolean FailIfExists)

 

static func CreateFolder(_ FolderName: String, _ FailIfExists: Boolean) -> Folder

 

static Folder CreateFolder(String FolderName, Boolean FailIfExists)

 

Shared Function CreateFolder(FolderName As String, FailIfExists As Boolean) As Folder

Parameters:

  • FolderName: Full name of the folder.
  • FailIfExists: if true fails if the folder already exists.

Delete (String)

 

class method Delete(aFolder: String)

 

static void Delete(String aFolder)

 

static func Delete(_ aFolder: String)

 

static void Delete(String aFolder)

 

Shared Sub Delete(aFolder As String)

Parameters:

  • aFolder:

Exists (String): Boolean

 

class method Exists(aFolder: String): Boolean

 

static Boolean Exists(String aFolder)

 

static func Exists(_ aFolder: String) -> Boolean

 

static Boolean Exists(String aFolder)

 

Shared Function Exists(aFolder As String) As Boolean

Parameters:

  • aFolder:

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

 

constructor    (declared in Object)

 

constructor

 

Folder()

 

init()

 

Folder()

 

Sub New()

constructor (not nullable String)

constructor

 

constructor(aFullName: not nullable String)

 

Folder(String! aFullName)

 

init(_ aFullName: String)

 

Folder(String aFullName)

 

Sub New(aFullName As String)

Parameters:

  • aFullName: Full name of the folder.

CreateFile

Creates a new file instance.

 

method CreateFile(FileName: String; FailIfExists: Boolean): File

 

File CreateFile(String FileName, Boolean FailIfExists)

 

func CreateFile(_ FileName: String, _ FailIfExists: Boolean) -> File

 

File CreateFile(String FileName, Boolean FailIfExists)

 

Function CreateFile(FileName As String, FailIfExists As Boolean) As File

Parameters:

  • FileName: filename
  • FailIfExists: if true fails if the file already exists.

CreateSubfolder

Creates a subfolder.

 

method CreateSubfolder(SubfolderName: String; FailIfExists: Boolean): Folder

 

Folder CreateSubfolder(String SubfolderName, Boolean FailIfExists)

 

func CreateSubfolder(_ SubfolderName: String, _ FailIfExists: Boolean) -> Folder

 

Folder CreateSubfolder(String SubfolderName, Boolean FailIfExists)

 

Function CreateSubfolder(SubfolderName As String, FailIfExists As Boolean) As Folder

Parameters:

  • SubfolderName: Name of the folder
  • FailIfExists: if true fails if the folder already exists.

Delete  override virtual

 

method Delete

 

void Delete()

 

func Delete()

 

void Delete()

 

Sub Delete()

Equals  virtual    (declared in Object)

Default constructor.

 

method Equals(aOther: Object): Boolean

 

Boolean Equals(Object aOther)

 

func Equals(_ aOther: Object) -> Boolean

 

Boolean Equals(Object aOther)

 

Function Equals(aOther As Object) As Boolean

Parameters:

  • aOther: the reference to compare this with.

Exists  override virtual

Check if this folder exists.

 

method Exists: Boolean

 

Boolean Exists()

 

func Exists() -> Boolean

 

Boolean Exists()

 

Function Exists() As Boolean

Finalize  protected virtual    (declared in Object)

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

 

Sub Finalize()

GetFile

Gets a file in this folder.

 

method GetFile(FileName: String): File

 

File GetFile(String FileName)

 

func GetFile(_ FileName: String) -> File

 

File GetFile(String FileName)

 

Function GetFile(FileName As String) As File

Parameters:

  • FileName: Name of the file to look for

GetFiles

Gets a list of all files in this folder.

 

method GetFiles: not nullable ImmutableList<File>

 

ImmutableList<File>! GetFiles()

 

func GetFiles() -> ImmutableList<File>

 

ImmutableList<File> GetFiles()

 

Function GetFiles() As ImmutableList<File>

GetHandle  protected    (declared in BaseFile) Windows

Returns a handle to this file.

 

method GetHandle: HANDLE

 

HANDLE GetHandle()

 

func GetHandle() -> HANDLE

 

HANDLE GetHandle()

 

Function GetHandle() As HANDLE

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

 

Function GetHashCode() As Int32

GetSubfolders

Gets a list of all subfolders.

 

method GetSubfolders: not nullable ImmutableList<Folder>

 

ImmutableList<Folder>! GetSubfolders()

 

func GetSubfolders() -> ImmutableList<Folder>

 

ImmutableList<Folder> GetSubfolders()

 

Function GetSubfolders() As ImmutableList<Folder>

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

Rename

Rename a folder.

 

method Rename(NewName: String): Folder

 

Folder Rename(String NewName)

 

func Rename(_ NewName: String) -> Folder

 

Folder Rename(String NewName)

 

Function Rename(NewName As String) As Folder

Parameters:

  • NewName: new name for this folder; returns the new folder instance.

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

Validate  protected override virtual

 

method Validate

 

void Validate()

 

func Validate()

 

void Validate()

 

Sub Validate()