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

Controlled File Path Handling #3

Open
manishmeganathan opened this issue Aug 7, 2022 · 2 comments
Open

Controlled File Path Handling #3

manishmeganathan opened this issue Aug 7, 2022 · 2 comments
Assignees

Comments

@manishmeganathan
Copy link
Owner

Implement a FilePath object that handles references to files or directories in MOIBit. This FilePath type will simply be a type containing some slice of path elements, each representing a directory layer towards the file's location.

It must implement methods to,

  • check if path points to directory or file (check if last element contains extension)
  • add elements to the path to grow the file path (as directory or file)
  • construct a complete string path by assembling the elements
  • retrieve filepaths to parent directory

It must be constructable from individual path elements and from a complete string path as well.

@manishmeganathan manishmeganathan self-assigned this Aug 7, 2022
manishmeganathan added a commit that referenced this issue Aug 7, 2022
- Create a file filepath.go with the skeleton code for FilePath implementation specified in #3
- Setup constructors for creating FilePath for root, from elements and from full string path
- Setup methods for checking if FilePath is root, a directory or a file.
- Setup methods for growing FilePath and getting parent
manishmeganathan added a commit that referenced this issue Aug 7, 2022
- Implemented NewFilePath constructor for creating the FilePath from a given variadic set of path elements. #3
- Added docs for Root() and FilePath
@manishmeganathan
Copy link
Owner Author

1675259 and 95a0e74 implement functionality for FilePath creation

@manishmeganathan
Copy link
Owner Author

ef11594 implements FilePath growing and parent fetch

manishmeganathan added a commit that referenced this issue Aug 9, 2022
- Refactored ListFiles, FileStatus and FileVersions methods of Client to accept a FilePath as the argument instead of a string path. #3
manishmeganathan added a commit that referenced this issue Aug 9, 2022
- Refactor ReadFile, WriteFile, RemoveFile and MakeDirectory methods of Client to use the FilePath as arguments instead of string paths. #3
manishmeganathan added a commit that referenced this issue Aug 9, 2022
- Fix MakeDir query building that was not converting the FilePath into a string for the request URL #3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant