class Clipboard [singleton]
extends Object
Signature
Return Type
Description
bitmap()
Bitmap
set_bitmap( bitmap:Bitmap )
class LinuxClipboard [singleton]
extends Object
Implemented with assistance from: - https://stackoverflow.com/a/27995840/135791 - https://stackoverflow.com/questions/18695934/error-cant-open-display-null-when-using-xclip-to-copy-ssh-public-key - https://emacs.stackexchange.com/questions/39019/xclip-hangs-shell-command
Signature
Return Type
Description
bitmap( [type="png":String ] )
Bitmap
set_bitmap( bitmap:Bitmap )
temp_file( [extension="png":String ] )
File
class MacOSClipboard [singleton]
extends Object
Signature
Return Type
Description
bitmap()
Bitmap
set_bitmap( bitmap:Bitmap )
class WindowsClipboard [singleton]
extends Object
Signature
Return Type
Description
bitmap( [existing_bitmap=null:Bitmap ] )
Bitmap
open()
Logical
set_bitmap( bitmap:Bitmap )
Adapted from https://stackoverflow.com/a/66401824/135791
extends Object
extends Object
incorporates PrintWriter , BufferedPrintWriter<<$buffer>>
Epilog is a PrintWriter log that stores all output in memory or in a file, optionally echoing to standard output. If the output is not stored to a file then all collected output is printed on program termination (including CTRL+C but not including an uncaught exception). USAGE uses Utility/Epilog ... Epilog.configure( File("Log.txt"), &echo ) # optional ... Epilog.println "XYZ" ...
extends BinaryExpression
extends Expression
extends BinaryExpression
extends Object
Signature
Return Type
Description
parse( command:String , [id_lookup=null:Function(String)->Expression] )
Expression
Signature
Return Type
Description
call()
Variant
class ExpressionParser [singleton]
extends Object
extends BinaryExpression
extends BinaryExpression
extends UnaryExpression
extends Expression
Name
Type
Description
value
Variant
extends BinaryExpression
extends BinaryExpression
extends Expression
extends Object
Signature
Return Type
Description
init( diff:String )
init( file:File )
apply( lines:String[] )
extends FileDiffLine
class FileDiffContextLine
extends FileDiffLine
extends Object
extends Object
extends FileDiffLine
extends Object
extends Object
Signature
Return Type
Description
init( pattern:String , [is_new=false:Logical ] )
extends Object
Signature
Return Type
Description
init( file:File )
add( section_name:String , pattern:String )
Logical
Returns false if all lines in 'pattern' are already in the .gitignore
add( section_name:String , patterns:String[] )
Logical
print_new_entries( [prefix="":String ] )
remove( pattern:String )
Logical
Returns false if the .gitfile did not contain the pattern.
save( [save_as=null:File? ], &verbose )
Logical
Returns false on error.
to<<String>>()
String
extends Object
incorporates CommonCompoundMethods
A simple wrapper for command-line Git. Git must be installed separately. EXAMPLE uses Utility/GitRepo local repo = GitRepo( "https://github.com/brombres/LSPath.git ", File("LSPath") ) if (repo.exists) if (not repo.has_local_changes and repo.has_remote_changes) repo.pull( &verbose ) endIf else repo.clone( &verbose ) endIf @trace repo.branches if (not repo.local_branch_exists("test_branch_1")) repo.create_branch( "test_branch_1", &verbose ) endIf repo.checkout( "test_branch_1", &verbose ) repo.checkout( "test_branch_2", &create_branch, &verbose ) File("LSPath/TestFile.txt").save( "Test file content" ) repo.add( "TestF*.txt" ) repo.commit( "[TestFile]", &verbose ) repo.checkout( "test_branch_1" ) repo.pull repo.merge_from( "test_branch_2", &verbose ) repo.push( &verbose ) repo.delete_local_branch( "test_branch_2", &verbose ) repo.checkout( "main", &verbose ) repo.delete_branch( "test_branch_1", &verbose )
Signature
Return Type
Description
add( file:File , &verbose )
Logical
add( pattern:String , &verbose )
Logical
branch()
String
branches()
String[]
checkout( branch:String , &create_branch, &verbose )
Logical
clone( [branch=null:String ], &verbose )
Logical
commit( message:String , &all, &allow_empty, &verbose )
Logical
create_branch( branch:String , &verbose )
Logical
delete_branch( branch_name:String , &verbose )
Logical
delete_local_branch( branch_name:String , &verbose )
Logical
Deletes the specified branch locally. The specified branch cannot be the current branch.
delete_remote_branch( branch_name:String , &verbose )
Logical
Deletes the specified branch from the origin.
description()
String
exists()
Logical
has_local_changes()
Logical
has_remote_changes()
Logical
Note: the response may take a few moments. Due to the delay it is not recommended to automatically call this method frequentlly.
head( &short )
String
local_branch_exists( branch_name:String )
Logical
merge_from( from_branch:String , &verbose )
Logical
operator==( other:GitRepo )
Logical
print_to( buffer:PrintWriter )
pull( &verbose )
Logical
push( &force, &verbose )
Logical
Pushes this branch to the origin, setting up remote tracking if necessary.
set_origin( url:String , &verbose )
Logical
tag()
String
to<<Object>>()
Boxed<<GitRepo>>
to<<String>>()
String
to<<Variant>>()
Variant
type_info()
TypeInfo
extends Object
Name
Type
Description
cur_indent
String
cur_line
String
max_width
Int32
result
String
tab_spaces
String
tab_width
Int
Used for word wrap line length calculations. Leading tabs are preserved but internal tabs are converted to this many spaces.
Signature
Return Type
Description
format( text:String , [max_width=80:Int32 ], &console_width_limited=true )
String
indent_length( text:String )
Int32
leading_indent( text:String )
String
output_cur_line()
extends Object
Signature
Return Type
Description
init( &stopped )
init( duration:Real , &stopped, &expired )
elapsed()
Real
elapsed_ms()
Int64
is_expired()
Logical
is_running()
Logical
is_stopped()
Logical
operator+( delta_time:Real )
Timer
Increase the elapsed interval of this stopwatch.
operator-( delta_time:Real )
Timer
Decrease the elapsed interval of this stopwatch.
progress()
Real
Count-down: returns elapsed / duration Count-up: returns 0
remaining()
Real
If a count-up timer, returns 0. If count-down, return 0 <= seconds remaining <= duration.
restart()
restart( duration:Real )
start()
Starts if currently stopped; otherwise no effect.
stop()
Stops if currently running; otherwise no effect.
to<<String>>()
String
extends Object
Signature
Return Type
Description
init()
to<<String>>()
String
class VariantListPool [singleton]
extends RecyclePool<<Variant>>
USAGE # High GC impact if called frequently obj.call( @[1,2] ) # Low/No GC impact if called frequently uses Utility/VariantListPool ... use args = VariantListPool args.add( 1 ) args.add( 2 ) obj.call( args ) endUse
Signature
Return Type
Description
on_use()
Variant
on_end_use( value:Variant )
class VersionNumber [compound]
incorporates CommonCompoundMethods
Name
Type
Description
version
String
Signature
Return Type
Description
count()
Int32
description()
String
is_compatible_with( other:String )
Logical
is_compatible_with( other:VersionNumber )
Logical
Returns true if all parts of the shorter version are equal to the corresponding parts of the longer version. Examples VersionNumber("3").is_compatible_with("3.2") -> true VersionNumber("3.1").is_compatible_with("3.2") -> false
operator<>( other:String )
Int
operator<>( other:VersionNumber )
Int
Compares two multipart versions and returns: -1 if this < other 0 if this = other 1 if this > other Each version can have any number of parts; mismatched numbers of parts are allowed. "Missing" parts are treated as 0. No allocations are made to perform the comparison. Examples: compare_versions("1.0", "1.0.0") -> 0 compare_versions("1.0", "1.0.1") -> -1 compare_versions("1.10.0","1.2.3") -> 1
operator==( other:VersionNumber )
Logical
part( n:Int32 )
Int32
print_to( buffer:PrintWriter )
to<<Object>>()
Boxed<<VersionNumber>>
to<<String>>()
String
to<<Variant>>()
Variant
type_info()
TypeInfo