Linux hidden files and directories

var specialFolderIcons as FolderItem= SpecialFolder.Home.Child(".local").Child("Share").Child("icons")

I can’t seem to get FolderItem to work with hidden directories in Linux (aka dot files/folders), am I doing something wrong?

var specialFolderIcons as FolderItem= new FolderItem("~/.local/share/icons")

Also doesn’t seem to work… Thanks for any help!

Could you be more specific about in what way it is not working?

Two suggestions I have:

  • Use SpecialFolder.UserHome as that’s local to the user and your specific user might not have permission to access SpecialFolder.Home
  • Build the FolderItem one level at a time. If an item doesn’t exist, the Child of it will be a nil object, and when you go to get the child on that you’ll get a NilObjectException.

I feel like a dummy but I had the “S” capitalized :face_with_peeking_eye:

I thought it dealt with the .local portion because the String “~/.local/share/icons” doesn’t work… ~ is a synonym for home on Linux but Xojo doesn’t like it I think. When I moved to try the special folder method I must of accidentally capitalized the “S” causing me to think it dealt with the “.local” instead.

Thanks for the help though! I will use UserHome as I think that will raise less issues overall on user devices.