Skip to content

Conversation

@labkey-jeckels
Copy link

Rationale

Adopt FileLike for more pipeline APIs

Related Pull Requests

Changes

  • Many switches to FileLike

@bbimber
Copy link
Collaborator

bbimber commented Oct 26, 2025

hi @labkey-jeckels, do you anticipate there is going to come a point where FileLike is enforced across modules? It seems like a reasonable enough concept, but as you probably know the sequence module (and related code) is pretty heavy on File-based code. I'm trying to understand where I need to plan a chunk of time to deal with this or not.

@labkey-jeckels
Copy link
Author

We want to move towards using FileLike in all of our server-side APIs. It's a bit of a mess right now with various combinations of File/Path/FileLike.

I don't expect we'll ever ban modules from supporting only files, converting from FileLike to File when they like.

public FileLike getDataDirectoryFileLike()
{
return new File(System.getProperty("java.io.tmpdir"));
return FileSystemLike.wrapFile(new File(System.getProperty("java.io.tmpdir")));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, all these usages of System.getProperty("java.io.tmpdir") should be replaced with some call to FileUtil. For the TODO list.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean something like FileUtil.getTmpDirFileLike(), correct?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, unless the code actually depends on using this temp directory vs whatever path LabKey has chosen as its default (might be the same, I didn't dive in).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two comments:

  • In general, I dont see any real problem with LabKey enforcing a layer over the filesystem, and it's probably an overdue and good idea. In experimented with migrating code in 25.7, and found the FileUtil helpers associated with FileLike to be kinda cumbersome; however, it seems like you're doing a lot on this front in the current release.
  • I cannot think of any reason our modules specifically need java.io.tmpdir. That's just the standard way, to my knowledge, for java code to find the tempdir. Having LabKey introduce a layer over this is probably a good idea.

@labkey-jeckels labkey-jeckels merged commit d8db0dd into develop Nov 5, 2025
11 of 13 checks passed
@labkey-jeckels labkey-jeckels deleted the fb_pipelineFileLike branch November 5, 2025 01:47
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

Successfully merging this pull request may close these issues.

4 participants