How to create a new file with existing file's resource fork?
Hello,
I would like to create a new file that has the resource fork of an existing file. I had though of making a copy of the existing file, seek to the beginning of the copy and write the new data, but for large files, that creates the whole file even when not needed. I currently create the new file with [NSFileManager createFileAtPath: contents: attributes:], but attributes do not include resource fork items, like custom icons, color label, etc.
[NSURL resourceValuesForKeys] gives a common subset of resource data, like icons and color label, but that's about it. Is there some way to get the resource fork or a copy of the file without getting the whole file?
Thanks
What are you trying to do here? While resource forks might still be quasi-supported, you really shouldn't be thinking about them as such. Instead, think in terms of extended attributes. You can use the low-level xattr() functions to get some of that or you can use the new NSURL methods.
Similar Messages
-
How to create the new row with existing values
Hi all,
first of all i create a row,
i opened that in edit mode,
suppose i want to edit any one of the value in that recordd,
that time compulsory create a new row with those valuess.
how can i create a new row with those valuess.Hi Anusha,
This code correct for your requirement, only thing is you are not able to modify it as per your requirement.
What you have to do is:
1. Copy queried row into into new row, change primary key values(but don't commit your changes here).
2. Now you have two rows in your VO(OLD as well as New)
3. Make any changes if you want using User Interface.
4. At the save button first compare OLD and NEW row, if any value is differing then commit the chnages(it will insert new row in corresponding database table), if no changes are there I mean to say OLD value and NEW rows are same then rollback(it will remove copied row from VO and no row will be inserted in database.)
While comparing rows please note that Primary keys will not be same so don't compare Primary keys while comparing rows.
I hope it will help you.
Regards,
Reetesh Sharma -
How to create a new track with existing changes in the production
Hi
I need to create a new track for the ESS package with the existing changes that we already made to the ESS package. We already have a development track and the customisation to the ESS package has been already done in that track. Now my requirement is to create a new track ( DEV, CONS, TEST and PROD) with DEV having all the existing changes we made. In short how do I import the SCA's from development track PROD to the new track DEV. We are on NW2004 SPS20.
points rewarded for helpful answers
Thanks
SherilParam
Have you done the import in DEV and CONS and then Assembled .. ?
If yes then go to /usr/sap/jtrans/CMS/archives/.......... -> check for the track name and then the last .SCA file in it . Copy that SCA file in the /usr/sap/jtrans/CMS/inbox and go to the new track and configure the checkin to inbox ... You should see the SCA in there ... check those in and you are ready to have those SCA in your Production track ..
If no then you need to know the NWDS functions .. I shall send you the details to bring the incomplete changes (not assembled) to new track .. let me know if the first one worked ..
Thanks
Rahul -
How to create full new user with all privileges
how to create full new user with all privileges?
and how to delete existing users?
Thanks in advance..Common solution is probably to use sudo for privilege elevation, wiki should help
-
hello
how to create a new file myfile.txt in folowing URL
http://www.mydomain.com/upload/myfile.txtregardsthe_Orient wrote:
corrected code
I will to create a text file on webserver
this file hasethe content "Hello World"
</div>
try
String S="Hello World"
URL url = new URL("http://www.mydomain.com");
URLConnection hpCon = url.openConnection();
hpCon.setDoOutput(true);
File file = new File("http://www.mydomain.com/studentes/info.txt");
file.createNewFile();
// how to use FileOutputStream here
OutputStreamWriter out = new OutputStreamWriter(hpCon.getOutputStream());
out.write(content);
out.close();
}catch(Exception ex){ex.printStackTrace();}
Exception :
java.io.IOException: The filename, directory name, or volume label syntax is incorrect
{code}
regards
Whoa! Do you know what you're doing? Do you have permission to write on that URL? Or does the pathname parameter you passed on File is correct? How about let the server-side handle the creation of file for you by just requesting it? Do you know how to create a server-side Java program (e.i. Servlet)? Umm.. There's a Java tutorial for this for you to get started: [Reading from and Writing to a URLConnection|http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.html].
Ron
Server-Side Development Team
[Java-Man 2004|https://sites.google.com/site/raisoftware6/] -
How to create a new file - help please.
hi there
i need to create a new file in my program, i did the following:
/*code--------------------
PrintWriter out = new PrintWriter(new FileOutputStream(new File("c:\\somedirectory\\outputfile.txt")));
out.println("product code:"+productCode);
out.println("product price:"+productPrice);
out.println("product description:"+productDes);
out.flush();
out.close();
the directory c:\somedirectory\ does not exist yet. i was hoping that when the new file is created, so was the directory. when i run it. the program could not find the path with following error message:
c:\somedirectory\outputfile.txt (The system cannot find the path specified)
can anyone of you experts point a rigth solution? thank you.thanks
so the steps to create a new file in a new directory is as follow:
//create a file object with the directory path
File d = new File("c:\\xx\\");
d.mkdir();
//then create another file object with the path and the file name
File f = new File("c:\\xx\\abc.txt");
is this right? -
How to create a new file (doc, ppt or xls) using the secondary click??
Is there any way to create a new file(text, doc, docx, ppt, pptx, xls or xlsx) using the the secondary click (on the desktop or any folder) just like creating a new folder using secondary click! Please do let me know!
No. You need the Office applications to create them or another application capable of creating those types of files or at least saving files in those formats.
-
How to create an new administrator with ldif files
I need another administrator as orcladmin for create an new tree in OID 11g which groups and right must this administrator have?
Although you can create a superuser account that is able to manage entries, it won't be able to do so using ODSM until 11g Patchset 4.
What this means is that you may use ldapbind/ldapmodify/ldapadd/ldapdelete commands with this new user to do the same operations that you would normally only do using the superuser, but that until a future patchset (currently slated for 11g patchset 4), this user will not be able to login to ODSM.
Attempts to login to ODSM as this new user will fail with:
Error:
ODSM allows only super user to connect to OID.
Connected user is not a super user.
Identify the groups that the superuser is in, as follows:
ldapsearch -p <OID_port> -h <OID_host> -D "cn=orcladmin" -w <pwd> -b "" -s sub "uniquemember=cn=orcladmin" dn
Create a new user entry, to be used as the second superuser.
Add this user as a uniquemember to all the same groups returned in. This can either be done manually, or via the ldapmodify/ldapadd command with an LDIF file with the following syntax:
newadmin.ldif
dn: cn=odisgroup,cn=odi,cn=oracle internet directory
changetype: modify
add: uniquemember
uniquemember: cn=myadmin,cn=users,dc=myorg,dc=com
dn: cn=Provisioning Admins,cn=changelog subscriber,cn=oracle internet directory
changetype: modify
add: uniquemember
uniquemember: cn=myadmin,cn=users,dc=myorg,dc=com
ldapadd -p <OID_port> -h <OID_host> -D "cn=orcladmin" -w <pwd> -f newadmin.ldif
Thanks,
ABP -
How to create a new file having a name that is stored in a string
Hello friends i am new to java and i need your help .
I have a string which will take different values at run time. I want to create a file which has the same name as stored in the string . Can anyone help me?The Java Almanac example I linked to uses createNewFile() - the API documentation is not particularly clear about exactly what happens if c:\some\value\assigned\at doesn't already exist. But you're only a small experiment away from finding out!
Another page gives examples of directory creation.
http://www.exampledepot.com/egs/java.io/CreateDir.html
Once (or if) the file is created using a File then, yes, that File is the name of the file: parent directories and all. If you create a FileReader based on the File it will read from the right place. -
How to create a new index with already indexed folder
Hi
I have a requirement to create a new index.
I can able to create index. But,When i am specifying the data source, i am trying to include a data source which was already indexed in another index.
The system giving error that "The folder is already indexed and its available in another index".
How should i specify same folder in different indexes?Hi Patricio,
Thanks for your reply.
Our requirement is
From your example, lets take
index1 containts a data sources \folder1.
and i have a requirement to create another index called index2 with data sources
1) \folder1
2) \testfolder\testfolder1.
From help.sap.com i understand that there is no way to specify the same folder in different indexes.
I am looking for, Is there any solution to meet my requirement
Thanks -
How to create the new varients for existing generic article.
Hi all,
Can any body tell how can i create new varients for existing generic article
T-Code - MM41 ( IS-Retail).
Plz help, helpful answers will be rewarded.
Regards,
SaiHi
If you have access to the program of the tcode, then go to that tcode click on system->status, to get the program name, go to se38 give that program name and select variants radiobutton, create the variant.
Regards
Haritha. -
How to create a new document with a given theme, instead of choosing it every time.
Hi,
for work I only use a custom made keynote theme.
I've already deleted all the default themes, and the only one that is listed in the app is the one I actually use.
However every time I create a new document I have to chose its theme (that's normal having plenty of themes, but in my case is just a waste of time).
I was wondering if there's a way to tell keynote to start a new document with a given theme, in order to avoid to chose it every time.
Thank you for reading and for the help you will give.
GiacomoKeynote > Preferences > General tab
select “Use theme,” and then click Choose to select a theme. -
How to create a new Activity with report
I would want to know how I do to create a link in a report that connects me to the page of the Client to add a new record of activity if i want.
Substantially this link allows me to create a new activity in an agency that I directly select from the report.
Thank Vale.Hi
You should use the observer user for performing read-only operations.
This is one of the users that is created when you installed AccAD.
Here is the section that mentions it from our administration guide:
You are asked to provide passwords for the root, admin, and observer
users. Make note of these passwords since you will be required to provide them later.
When the installation is complete, log out root and log on again as admin.
Important
Perform any additional operations using the secured admin account. You can use the observer account to access the AccAD Administrator web UI in read-only mode only; this user cannot log on to the machine.
Best,
Zeev -
How to create a new folder with a different name everyday
Hello everybody,
I have another question if you don't mind. But first thank you again to V.K and red menace for helping me with the my previous post.
This is actually the same project, I just keep on seeing new obstacles when I'm almost done.
Below is my workflow. My workflow is exporting a quicktime movie to a folder in our server.
What I need to do at the end is to move the exported file into a folder but a folder needs to be created and it has to change at about midnight everyday.
For example today the file will go to Server>Client folder>File folder named 09-04-2008
Then the next day, I need to put the new exported files to Server>Client folder>File folder named 09-05-2008.
First, how can I create a sequential named folders and second how can I tell Automator to put the files in the right folders. This process is a 24 hour process.
Thanks for you future help.
Helmut
1) Get Specified Finder Items (Pointing to File Folder)
2) Get Folder Contents (tried checked and uncheck on Repeat for each subfolder
3) Get Specified movie ( I guess Filter finder items and choose .mov will work too)
4) Quicktime Export (exporting it to the Exported Folder)
5) Get Specified Finder Items (Pointing to File folder to get to the original file)
6) Get Folder Contents
7) Filter Finder Items (choose .mov)
8) Move Finder Items ( pointing to Archive Folder to move the original file)
9) Get Specified Finder Items (Pointing to Exported Folder)
10) Get Folder Contents
11) Filter Finder Items (.mov)
12) Move Finder Items (Pointing to Server Folder)It doesn't look like there is an easy way to do this. The sort and filter actions don't let you use variables, and I haven't found any actions that will alter a list. Making a text file with the name of the newest folder seems kind of clunky, but it is an option.
What I was thinking about was an action that would take the first item in a list - then you could get your backup folders, sort by creation date, and just take the top one in the list (the newest one). Hmmm - this should be fairly straight-forward, so maybe I'll write an action
In the mean time, give the Run AppleScript action in the following workflow a try.
Tested workflow:
1) Ask for Finder Items (Type: Folders)
2) Get Folder Contents
3) Sort Finder Items (by creation date in ascending order)
4) Run AppleScript (the following script)
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #FFDDFF;
overflow: auto;"
title="this text can be pasted into an Automator 'Run AppleScript' action">
on run {input, parameters}
return the first item in the input list
input: a list of anything
output: the first item, or {} if none or error
set output to {}
try
set the end of the output to the first item of the input
end try
return output
end run</pre>
5) View Results
The above workflow should return the newest item in the selected folder. -
How to create a new app using existing Dev & Dist certificates
Okay, I have already created one app that has been approved by Apple. Now we're ready to create a second app and we're trying to create the .p12 certificates using the existing Apple Dev and Dist Certificates. For some reason we can not get the .p12 certificates for the new app to link up with the existing Apple Dev and Dist certificates. I don't understand what I'm missing. Any help would be appreciated. Thanks!
You must have 2 folders with the following :
Dev:
aps developer identify.CER
CertificateSigningRequest.certSigningReq
Certificats.P12 (already created for your previous app)
Certificats Push Dev.P12
Mobile Provision
Distri
aps prodution identify.CER
CertificateSigningRequest.certSigningReq
Certificats distri.P12 (already created for your previous app)
Certificats Push Prod/distri.P12
Mobile Provision
Try, you will know quickly if you havent do it well
Maybe you are looking for
-
yea, i'm pretty much maxing out on my memory for my lap top and i want everything to save to my external hard drive. especially when i update my iphone and back it up. does anyone know how to get my macbook to do that?
-
Currency conversion display in the report
Hi, I've a report which displays Vendor Name, sold to party, Sold-To-Party No, Bstnk, Buyer No,Distribution Channel, Division, LI/PO Number, Sales Order,Order Description,audat,vdatu,vbeln,aemenge,aewavwr, kwert, aenetwr, stwae, etc fields in output
-
Installing SQL Server 2008 R2 SP2 CU 13
Hi, For one of SQL Server instances the current version is 10.50.4033(SQL Server 2008 R2 SP2 GDR). Now I am not able to install a cumulative upgrade "2967540 Cumulative update package 13 (CU13)". "There are no SQL Server instances or shared features
-
I have just installed OCS R2 on 3 boxes running Red Hat Linux AS 2.1 Has anyone got portal working with portlets for email, calendar, files etc. On OCS R1 I had everything installed on one AIX box and configuring portal was straightforward using the
-
Convert 16:9 to 4:3
I'm really confused with aspect ratios. Heres what I'm trying to do. I've got a piece of video that is 1280 x 720 in HD NTSC. In Final Cut Pro what is the best way for me to scale, crop or convert to 4:3 SD (720 x 480) without distortion and without