Returns whether segment is a safe single path component for SFTP uploads. Rejects separators, . / .. segments, and control characters.
segment
.
..
Candidate filename or year-folder name.
True when the segment may be joined under a configured remote directory.
Returns whether
segmentis a safe single path component for SFTP uploads. Rejects separators,./..segments, and control characters.