-
Notifications
You must be signed in to change notification settings - Fork 7
Read Only Projects
David Foster edited this page Jan 27, 2024
·
7 revisions
A *.crystalproj project in Crystal can be opened in read-only mode.
Crystal will never attempt to modify a read-only project. Any attempt to download new URLs or perform other modifications to a read-only project will fail with an error message (in the GUI) or with a ProjectReadOnlyError (in the shell). Additionally no newly-discovered URLs will be dynamically downloaded while browsing the served URLs in a read-only project.
It is useful to force a project to be read-only if you finish downloading a site to it and you don't want to accidentally modify the project further in the future.
To open a project as read-only temporarily:
- When opening a project in the GUI, check the "Open as read only" checkbox:
- When opening a project in the CLI, use the
--readonlyoption.
To force a particular project to always open as read-only:
- On macOS, right-click the
*.crystalprojfile in Finder and choose Get Info. A file info popup will appear. Check the "Locked" checkbox in the popup. Close the popup.
- On Windows, open the
*.crystalprojdirectory in Windows Explorer to reveal the containeddatabase.sqlitefile. Right-click thedatabase.sqlitefile and choose Properties. A properties popup will appear. Check the "Read Only" checkbox in the popup. Close the popup.
A project is opened as read-only iff:
- the user requests it by checking the "Open as read only" checkbox when opening a project in the GUI,
- the user requests it by providing the
--readonlyoption when running Crystal from the command-line, - its
*.crystalprojpackage is marked as Locked in macOS Finder, - its
*.crystalproj/database.sqlitefile is marked as Locked in macOS Finder or as Read Only in Windows, or - it resides on a read-only volume (such as a DVD, CD, or other optical disc).