Trash class
The trash workspace <root>/.trash, the sibling of .ocean and of the
ticket folders that holds everything gg removed from a ticket.
Nothing gg deletes on behalf of the user is lost right away: a published
ticket's repositories and its .code-workspace file are moved here, so a
forgotten local change can still be recovered. Emptying the trash is the
user's job.
Constructors
- Trash()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
createDirForTicket(
Directory ticketDir) → Directory -
Creates
<root>/.trash/<ticket>when it does not exist and returns it. -
dirFor(
String rootPath) → Directory -
Returns
<root>/.trashfor the workspace rootrootPath. -
dirForTicket(
Directory ticketDir) → Directory -
Returns
<root>/.trash/<ticket>for the ticket directoryticketDir. -
moveFromOcean(
{required FileSystemEntity source, required String rootPath}) → Future< String> -
Moves
source— a repository of the ocean — into<root>/.trash/.ocean/<org>/<repo>, keeping the path it had relative to<root>/.ocean. Returns the path it was moved to. -
moveFromTicket(
{required FileSystemEntity source, required Directory ticketDir}) → Future< String> -
Moves
sourceinto the trash of the ticketticketDir, keeping the path it had relative to the ticket (<org>/<repo>,<ticket>.code-workspace, …). Returns the path it was moved to. -
moveTicketToTrash(
{required Directory ticketDir}) → Future< Directory> -
Moves the whole ticket folder
ticketDirinto the trash as one unit — repositories,ticket.json,.gg/, the.code-workspacefile, everything — and returns the directory it was moved to (normally<root>/.trash/<ticket>).