Robot Framework cannot create folder via Create Folder keyword - python-3.x

I observe very strange situation my Robot Framework script cannot create folder via Create Directory keyword. Code is very simple
Create Directory folder_name
According to log step ends with success but actually folder is not created.
I use Robot Framework 3.2.2 on latest version of xubuntu. I suppose that something wrong with access to file system from script. But I cannot fond out where

Please use double slashes (//)
to separate the folders forming the path argument
("folder_name", as you've named it).
This notation is for Windows.
The idea can be explored from here on.

Related

Linux: which standard directory has write access by default?

my application is required update its program files when it detects a new version on the server. The update mechanism is performed by the application itself, and it replaces old code with new code in the same directory. Which directory in linux is best suited for this? If there is a standard directory which has write access by default(analogous to %AppData%\Local for windows), I would like to know which one it is.
I have tried using /var/<my-app-name-here> and /opt/<my-app-name-here>, but none of these directories have write access by default. The only way I can use them update files in them is if the user uses sudo, so i would just like to avoid making those problems by just installing to a directory with write access to begin with.
I am using a tool called jpackage to make the .deb file which install the application.

How to use a folder and file with the same name but different case from github in windows 10?

I want to clone a github repo that uses two different files/folders:
\packages\ - Folder
\Packages - File
However, due to windows not using Case Sensitive File/Directory Names, this isnt working, it gives me the error that the folder cant be renamed because a file already has the same name.
The program that uses this project REQUIRES that there be a no-extension binary text file Packages (Its like a giant file full of control files (If you recognize linux debian youll understand)
But it also requires a folder named \packages\ to hold the json files containing the config data for each control file within Packages
This question is an updated form of this previous question, which is outdated, and doesnt have an answer that solves the problem: Working in git with directories with the same name but different case in Windows
From Windows 10's update in April of 2018, they added a feature to "enable" case-sensitivity on specific directories.
I simply used the command on my github storage directory and now my project works fine.
To use the feature: Open a command prompt window (I dont believe this requires Administrator, it didnt for me)
Copy the full directory path to the folder you want to enable the flag on, type in the console:
fsutil.exe file SetCaseSensitiveInfo #:\Path\To\Directory\Here enable
Paste your C:/D:/E: or whatever Drive path into the location above. Then hit enter.
You DO NOT need to restart your computer, the flag seems to take effect immediately
Info sourced from: https://www.windowscentral.com/how-enable-ntfs-treat-folders-case-sensitive-windows-10#enable_case_sensitivity_ntfs_windows10

What is node_modules_bak?

I've got a folder in my project directory called 'node_modules_bak'. I don't know where it comes from or what it does. Google and StackOverflow do not provide any information about this name.
Does anyone know what it is and whether I can delete it safely?
It’s not a folder generated by node or npm or any well known tools.
It might be something generated internally by a script or even another developer wishing to backup the modules.
I would do a code search in all project files to see if the name comes up anywhere.
Like the other answer mentions, there are some tools that create this directory. It is not created by node or npm.
In my case it was https://github.com/siddharthkp/cost-of-modules/blob/0a009d670a4e4fcb185b29979b5f58668664da4b/src/helpers.js#L47-L49
/* Check if node modules exist and then backup */
let nodeModulesExist = fs.existsSync('node_modules')
if (nodeModulesExist) fs.copySync('node_modules', 'node_modules_bak')
There are a couple more of these on github when I search across all repos https://github.com/search?q=node_modules_bak+language%3AJavaScript&type=Code&ref=advsearch&l=JavaScript&l=

How to handle building files outside of directory

I have a build set up and I'm struggling on how to handle one aspect.
I have successfully setup a variantdir for my project folder src build output, however I have
source that resides outside the project folder that needs to be build and included.
I am able to add the files I need into the build, however the object files are put into the external directory where the library souce files are.
Is there a standard way to solve this. I would like to avoid adding any scons files to the external directory as it is a standard intall of a tool.
What I attempted was to Mkdir() a temporary folder, Copy() the files, and build the files. This seems to work, but only the first time as the file permissions are set to readonly. Also, the only way to get it to work seemed to be to use the Execute() command which caused the action to happen at every build.
Have a look at the Repository() method (see http://scons.org/doc/production/HTML/scons-user.html#chap-repositories in the SCons UserGuide). It lets you sort of "mount" a folder to the top-level of your source tree. Then you can refer to them locally, and specifying "duplicate=1" for your variant dir should keep your remote folder clean from built files.
Hope this helps...
I was able to get the functionality I was looking for by building the objects in the external directory and then using the Move() Factory to move the object files.
If Anyone can point out a more 'scons'sy way of doing it please let me know.

MFC CFTPConnection : How to reset the directory

I am facing issues with FTP folder resetting using the class CFTPConnection.
My development environment is VC++6.0 and MFC.
I am able to create subfolders in the FTP using the function "CreateDirectory" of CFTPConnection class (FTP Server is in RHEL using vsftpd package).
But not able to find the function to go back to the root folder or parent folder.
Kindly anyone help me to fix this issue.
Thanks and Regards,
Alvin
The method you want is CFtpConnection::SetCurrentDirectory which simply uses FtpSetCurrentDirectory to change the directory.
Since FtpSetCurrentDirectory accepts:
Pointer to a null-terminated string that contains the name of the
directory to become the current working directory. This can be either
a fully qualified path or a name relative to the current directory.
You should be able to navigate using relative paths like ".." to go back a folder or to reset to parent folder something like "/".

Resources