File

Overview

File information class.

Location

  • Reference: Island.fx
  • Namespace: RemObjects.Elements.System
  • Platforms: Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS, watchOS Simulator, Windows
  • Ancestry: BaseFile | File

 

constructor    (declared in Object)

Default constructor.

 

constructor

 

File()

 

init()

 

File()

constructor (not nullable String)

Constructor for this class.

 

constructor(aFullName: not nullable String)

 

File(String! aFullName)

 

init(_ aFullName: String)

 

File(String! aFullName)

Parameters:

  • aFullName: the full name of this file.

Copy (not nullable File)

Copies a file to a new location

 

method Copy(NewFile: not nullable File)

 

void Copy(File! NewFile)

 

func Copy(_ NewFile: File)

 

void Copy(File! NewFile)

Parameters:

  • NewFile: Target filename

Copy (not nullable Folder, not nullable String): not nullable File

Copies a file to a new location

 

method Copy(Destination: not nullable Folder; NewName: not nullable String): not nullable File

 

File! Copy(Folder! Destination, String! NewName)

 

func Copy(_ Destination: Folder, _ NewName: String) -> File

 

File! Copy(Folder! Destination, String! NewName)

Parameters:

  • Destination: Target directory
  • NewName: Target filename

Copy (not nullable String): not nullable File

Copies a file to a new location

 

method Copy(FullPathName: not nullable String): not nullable File

 

File! Copy(String! FullPathName)

 

func Copy(_ FullPathName: String) -> File

 

File! Copy(String! FullPathName)

Parameters:

  • FullPathName: Target filename

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; }

DateCreated    (declared in BaseFile)

Date this filesystem element was created.

 

property DateCreated: DateTime read;

 

DateTime DateCreated { get; }

 

var DateCreated: DateTime { get{} }

 

DateTime DateCreated { __get; }

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; }

Delete  override virtual

Deletes a file.

 

method Delete

 

void Delete()

 

func Delete()

 

void Delete()

Equals  virtual    (declared in Object)

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

Parameters:

  • obj: the reference to compare this with.

Exists  override virtual

Check if this element exists.

 

method Exists: Boolean

 

Boolean Exists()

 

func Exists() -> Boolean

 

Boolean Exists()

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; }

Finalize  protected virtual    (declared in Object)

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void 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; }

GetHandle  protected    (declared in BaseFile) Windows

Returns a handle to this file.

 

method GetHandle: HANDLE

 

HANDLE GetHandle()

 

func GetHandle() -> HANDLE

 

HANDLE GetHandle()

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()

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

Length

Contains the size of this file.

 

property Length: Int64 read;

 

Int64 Length { get; }

 

var Length: Int64 { get{} }

 

Int64 Length { __get; }

Move (not nullable File)

Moves a file to a new location

 

method Move(NewFile: not nullable File)

 

void Move(File! NewFile)

 

func Move(_ NewFile: File)

 

void Move(File! NewFile)

Parameters:

  • NewFile: Target filename

Move (not nullable Folder, not nullable String): not nullable File

Moves a file to a new location

 

method Move(DestinationFolder: not nullable Folder; NewName: not nullable String): not nullable File

 

File! Move(Folder! DestinationFolder, String! NewName)

 

func Move(_ DestinationFolder: Folder, _ NewName: String) -> File

 

File! Move(Folder! DestinationFolder, String! NewName)

Parameters:

  • DestinationFolder: Target directory
  • NewName: Target filename

Move (not nullable String): not nullable File

Moves a file to a new location

 

method Move(FullPathName: not nullable String): not nullable File

 

File! Move(String! FullPathName)

 

func Move(_ FullPathName: String) -> File

 

File! Move(String! FullPathName)

Parameters:

  • FullPathName: Target filename

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; }

ReadBytes

Reads the content of this file.

 

method ReadBytes: array of Byte

 

Byte[] ReadBytes()

 

func ReadBytes() -> Byte...

 

Byte[] ReadBytes()

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)

Parameters:

  • a: left value
  • b: right value

Rename

Renames a file.

 

method Rename(NewName: not nullable String): not nullable File

 

File! Rename(String! NewName)

 

func Rename(_ NewName: String) -> File

 

File! Rename(String! NewName)

Parameters:

  • NewName: Target filename

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

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; }

DateCreated    (declared in BaseFile)

Date this filesystem element was created.

 

property DateCreated: DateTime read;

 

DateTime DateCreated { get; }

 

var DateCreated: DateTime { get{} }

 

DateTime DateCreated { __get; }

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; }

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; }

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; }

Length

Contains the size of this file.

 

property Length: Int64 read;

 

Int64 Length { get; }

 

var Length: Int64 { get{} }

 

Int64 Length { __get; }

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; }

 

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)

Parameters:

  • a: left value
  • b: right value

 

constructor    (declared in Object)

Default constructor.

 

constructor

 

File()

 

init()

 

File()

constructor (not nullable String)

Constructor for this class.

 

constructor(aFullName: not nullable String)

 

File(String! aFullName)

 

init(_ aFullName: String)

 

File(String! aFullName)

Parameters:

  • aFullName: the full name of this file.

Copy (not nullable File)

Copies a file to a new location

 

method Copy(NewFile: not nullable File)

 

void Copy(File! NewFile)

 

func Copy(_ NewFile: File)

 

void Copy(File! NewFile)

Parameters:

  • NewFile: Target filename

Copy (not nullable Folder, not nullable String): not nullable File

Copies a file to a new location

 

method Copy(Destination: not nullable Folder; NewName: not nullable String): not nullable File

 

File! Copy(Folder! Destination, String! NewName)

 

func Copy(_ Destination: Folder, _ NewName: String) -> File

 

File! Copy(Folder! Destination, String! NewName)

Parameters:

  • Destination: Target directory
  • NewName: Target filename

Copy (not nullable String): not nullable File

Copies a file to a new location

 

method Copy(FullPathName: not nullable String): not nullable File

 

File! Copy(String! FullPathName)

 

func Copy(_ FullPathName: String) -> File

 

File! Copy(String! FullPathName)

Parameters:

  • FullPathName: Target filename

Delete  override virtual

Deletes a file.

 

method Delete

 

void Delete()

 

func Delete()

 

void Delete()

Equals  virtual    (declared in Object)

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

Parameters:

  • obj: the reference to compare this with.

Exists  override virtual

Check if this element exists.

 

method Exists: Boolean

 

Boolean Exists()

 

func Exists() -> Boolean

 

Boolean Exists()

Finalize  protected virtual    (declared in Object)

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

GetHandle  protected    (declared in BaseFile) Windows

Returns a handle to this file.

 

method GetHandle: HANDLE

 

HANDLE GetHandle()

 

func GetHandle() -> HANDLE

 

HANDLE GetHandle()

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()

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

Move (not nullable File)

Moves a file to a new location

 

method Move(NewFile: not nullable File)

 

void Move(File! NewFile)

 

func Move(_ NewFile: File)

 

void Move(File! NewFile)

Parameters:

  • NewFile: Target filename

Move (not nullable Folder, not nullable String): not nullable File

Moves a file to a new location

 

method Move(DestinationFolder: not nullable Folder; NewName: not nullable String): not nullable File

 

File! Move(Folder! DestinationFolder, String! NewName)

 

func Move(_ DestinationFolder: Folder, _ NewName: String) -> File

 

File! Move(Folder! DestinationFolder, String! NewName)

Parameters:

  • DestinationFolder: Target directory
  • NewName: Target filename

Move (not nullable String): not nullable File

Moves a file to a new location

 

method Move(FullPathName: not nullable String): not nullable File

 

File! Move(String! FullPathName)

 

func Move(_ FullPathName: String) -> File

 

File! Move(String! FullPathName)

Parameters:

  • FullPathName: Target filename

ReadBytes

Reads the content of this file.

 

method ReadBytes: array of Byte

 

Byte[] ReadBytes()

 

func ReadBytes() -> Byte...

 

Byte[] ReadBytes()

Rename

Renames a file.

 

method Rename(NewName: not nullable String): not nullable File

 

File! Rename(String! NewName)

 

func Rename(_ NewName: String) -> File

 

File! Rename(String! NewName)

Parameters:

  • NewName: Target filename

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()