Why Tooltwist Controller deletes or overwrite files in destination server? - tooltwist

When I use the ToolTwist Controller to deploy my application, it deletes or overwrites files configuration files on the destination server that I don't want changed. Is there any way to prevent this?

Yes, there is a way to prevent this. You just need to protect those files or folders that you don't want to be overwritten. To do this, you just need to update the protect property of .fip-destination file found inside ~/server/ folder.
This is the default value:
protect=mysql/.*,tomcat/work/.*,tomcat/logs/.*,protected/.*,tomcat/conf/tomcat-users.xml
Sample customized value:
protect=mysql/.*,tomcat/work/.*,tomcat/logs/.*,tomcat/lib/.*,tomcat/endorsed/.*,tomcat/bin/.*,tomcat/conf/.*,tomcat/webapps/elbhc.*,tomcat/webapps/ttsvr/WEB-INF/.*,protected/.*

Related

Is there an easy way to move a file to a different folder in dbt Cloud?

Is there an easy way to move a file to a different folder in dbt Cloud, without having to create a new file of the same name in the new folder, copy/paste from the old file, and delete the old file, which is a pain.
Is there a good reason I should NOT do this? I assume my refs still work as long as the filename remains the same, and I don't have any specific folder logic tied to this file.
For example, say I have my_model.sql in my 'staging' folder and I want to simply move it to my 'mart' folder instead. In this example I'd like to do this to reflect that my file is really a more 'stable' mart-type table file vs a staging view. I realize I can just change the materialization type, but I'm doing this more to organize things clearly. Thanks!
The way to move a file in the cloud IDE for dbt is not 100% obvious. You can use the rename function to move a file to another location.
Click on the drop down next to the file name, then select "Rename." That will open a file path and you can change where the file lives from there by typing in the new folder's name.
The easiest way I have found to do this is...not using DBT Cloud, but using github desktop (no command line needed).
Create a new branch
Open repository in github
View files in your file explorer
Move files or directory locally
Upload to github
Push to origin for the branch you created
Open a pull request
Merge
Depending on what the file or directory is you may find the creating a new branch and opening PR to be overkill. For my specific project there is a lot of legacy organization and models that we aren't totally sure don't have downstream dependencies, so creating a new branch for this allowed me to test run all of our models.
Hope this helps!

Delete all Storage Files in Backand

I need to delete all the storage files in the backand...
In Panel > Hosting > Storage Filess - it's possible to remove only one per.
In Actions it's possible to remove only one per to.
files.delete(**filename**);
When you delete an app from Backand, it will also delete any stored files for your application. There should be no additional actions needed on your part. If you still have concerns, you can use the command-line interface to point your hosting files at an empty directory, which will have a side effect of deleting the existing files. More information is available at http://docs.backand.com/en/latest/getting_started/hosting/index.html

Visual Studio 2010 Setup does not create added file

My problem should be plain and simple to solve, but google is not helping me today.
I need to read/write a configuration file (config.xml) and, as i see so much problems with permissions with special folders, i decided for myDocuments.
Now, from File system (Setup), I added a custom special folder (myDocuments)
added a subfolder (g1OKweb) inside myDocuments
added the file (config.xml) inside g1OKweb
What I expect, reading around, is that during the installation g1OKweb should be created if not existing or older, and the same for config.xml, but it isn't.
Does someone have any clue?
Thanks in advance
Use Directory.CreateDirectory to create the directory before attempting to access the file. This will automatically create all parts of the path that do not yet exist. If the full path already exists, it will do nothing.
When opening the file, use a FileStream constructor overload that allows you to specify FileMode.OpenOrCreate. This will succeed regardless of whether the file already exists or not.
When you have opened the file, check to see if it is empty before parsing it. If it is empty, insert your XML root element first.

Infinispan Configurations Using property file

Is it possible to load values for infinispan-config.xml file from some property file so that we can get rid of hard coded values. If possible then can somebody show me the way how i load property file in infinispan-config.xml file because there is no Pre defined tag for configuration.
This is possible by setting respective system properties.
For example here is one specific Infinispan configuration file which is using this approach: https://github.com/infinispan/infinispan/blob/master/core/src/test/resources/configs/string-property-replaced.xml
and here is a test which is working with that file: https://github.com/infinispan/infinispan/blob/master/core/src/test/java/org/infinispan/config/StringPropertyReplacementTest.java
This looks to be the most straightforward way how to achieve this.
The last thing which needs to be done is to simply read all lines in your configuration file and put them correctly to system properties.

Moving the contents of a directory to another directory (iOS)

When a user uses my app without logging on I store all the files they create in a directory called default_dir(which contains files and sub-dirs). When they do eventually login in I need to move the files from default_dir to a newly created dir called user_name.
That gives me 2 options.
Rename default_dir to user_name (I can't see anything on NSFilemanager to indicate this is possible).
Or try to somehow copy all the files and dirs into a newly created dir, user_name.
Can you advise how best to proceed in accomplishing this please?
Many Thanks,
-Code
Did you try NSFileManager's -moveItemAtURL:toURL:error: ?