Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VU Server Filesystem class #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

SasaKaranovic
Copy link
Owner

Summary

This PR consolidates all file paths referenced by VU Server into single class.
It also adds feature that allows for changing VU Server data directory by specifying VU_SERVER_DATA_PATH system environment variable.

Server will test directories in the following order

  1. Directory specified by the system environment variable (VU_SERVER_DATA_PATH)
  2. User directory (ie. c:\Users\USERNAME\ or /users/USERNAME/)
  3. VU Server install directory (ie. c:\Program Files\KaranovicResearch\VUServer\)

In order to use the directory, VU Server needs to have read/write access to it.
This is tested by writing a file to the directory and then removing it.
If this operation is successful, server will stop and use that folder as VU Server data folder.

Added

  • VU Filesystem class
    • Determines file paths for all VU Server data
    • Checks if data directory is writeable
    • Creates default folder structure
    • Creates default files used by the server (if missing, ie config.yaml, imgblank )
    • (temp-fix) Migrates data from VU SErver installation folder to new VU Server data folder

Changed

  • Base logger will use VU Filesystem class to determine the log file path
  • Server will use VU Filesystem class to determine file upload path, PID file path
  • Server Config will use VU Filesystem class to determine the location of config.yaml file
  • Database will use VU Filesystem class to determine the location of vudials.db file
  • VU Notification class will print messages to console on non-Windows systems (instead of ignoring them)

Removed

  • NA

Copy link

github-actions bot commented May 6, 2024

This PR is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant