Skip to content

Manage Resources

This chapter creates disposable files and directories from Darek, renames and moves them, copies content and path forms, and removes the complete disposable exercise. The maintained tutorial files remain intact.

Before You Begin

If you enter this chapter directly, first complete Prepare the User Guide Exercises.

Complete Preview and Open Files. Exit Odra, then restore the Project before creating this chapter's disposable resources:

"$HOME/odra-guide/kit/bin/odra-guide" reset forecast-engine

Open the maintained User Guide Workspace, show Darek with C-x t t, and select the Forecast Engine Project root.

All changes in this chapter stay below a new darek-practice directory. Do not substitute a directory that contains work you intend to keep: Darek deletion is permanent.

Create a Directory and File

Press c d, enter darek-practice, and press RET. Darek creates the directory beneath the selected Project root and publishes a refreshed tree.

Select darek-practice, press c d, and create an archive directory. Return to darek-practice, press c f, enter draft.txt, and press RET. The new empty file appears without replacing the active editing document.

Creation resolves a selected directory directly and a selected file through its parent directory. An existing name, stale selection, permission failure, or resource bound rejects the operation without publishing a partial tree.

Rename the File

Select draft.txt and press R. Replace the proposed name with notes.txt and press RET. The node changes in place after the filesystem operation is validated.

If the file is open, Odra updates its document path with the successful rename. It never overwrites an existing destination implicitly.

Move and Copy the File

Select notes.txt and press m. The filesystem candidate surface opens for a destination directory. Filter for ~/odra-guide/work/projects/forecast-engine/darek-practice/archive, use TAB to complete candidates as needed, and press RET on archive.

Expand archive, select notes.txt, and press y f. Choose ~/odra-guide/work/projects/forecast-engine/darek-practice as the destination. The copy appears beside archive, while the original remains inside archive.

Repeat the same copy without changing either name. Darek rejects the existing destination instead of overwriting it. Refresh with r if an external filesystem change makes the displayed generation stale.

Copy Useful Path Forms

Select archive/notes.txt and use the following commands:

Binding Retained text
y a Absolute path.
y r Path relative to the containing Project root.
y p Containing Project root path.
y n Selected resource name only.

After each command, move focus to an ordinary scratch or disposable text buffer and press C-y to inspect the retained value. Undo the insertion with C-/, then return to Darek with C-x t o for the next form.

A Project-relative or Project-root copy requires Project ownership. On an ordinary Dir outside a Project, use the absolute path or name form instead.

Remove the Exercise

Select the copied darek-practice/notes.txt, press d, read the permanent deletion prompt, and confirm. Delete archive/notes.txt in the same way, then delete the empty archive directory and finally darek-practice.

Deletion revalidates the selected resource before changing the filesystem. It is rejected while an affected document remains open, and it never treats the operation as recoverable. Close any exercise document explicitly before retrying.

Recover from Resource Problems

Previous: Preview and Open Files · Files, Projects, and Workspaces · Next: Use Contextual Operations